From 1ae3da425c2e0f0e5b32db7d10a5510a3a2a652f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 4 Nov 2023 13:21:30 +0100 Subject: [PATCH] app/state.go: Adding StateLoader and StateSaver function types. --- app/state.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/state.go b/app/state.go index b0c358e..2edb323 100644 --- a/app/state.go +++ b/app/state.go @@ -5,3 +5,11 @@ type State struct { // Last processed block CurrentBlock uint32 } + +type ( + // StateLoader is a function that loads a state. + StateLoader func(*State) + + // StateSaver is a function that saves a state. + StateSaver func(State) error +)