@@ -38,19 +38,6 @@ type DaemonAdapters interface {
38
38
Stop () error
39
39
}
40
40
41
- // StateMachineStore is an interface that allows the state machine to persist
42
- // its state across restarts. This is used to track the state of the state
43
- // machine for supply verification.
44
- type StateMachineStore interface {
45
- // CommitState is used to commit the state of the state machine to disk.
46
- CommitState (context.Context , asset.Specifier , State ) error
47
-
48
- // FetchState attempts to fetch the state of the state machine for the
49
- // target asset specifier. If the state machine doesn't exist, then a
50
- // default state will be returned.
51
- FetchState (context.Context , asset.Specifier ) (State , error )
52
- }
53
-
54
41
// IssuanceSubscriptions allows verifier state machines to subscribe to
55
42
// asset group issuance events.
56
43
type IssuanceSubscriptions interface {
@@ -90,11 +77,6 @@ type ManagerCfg struct {
90
77
// interact with external daemons whilst processing internal events.
91
78
DaemonAdapters DaemonAdapters
92
79
93
- // StateLog is the main state log that is used to track the state of the
94
- // state machine. This is used to persist the state of the state machine
95
- // across restarts.
96
- StateLog StateMachineStore
97
-
98
80
// ErrChan is the channel that is used to send errors to the caller.
99
81
ErrChan chan <- error
100
82
}
@@ -244,19 +226,12 @@ func (m *Manager) startAssetSM(ctx context.Context,
244
226
QuitChan : m .Quit ,
245
227
}
246
228
247
- // Before we start the state machine, we'll need to fetch the current
248
- // state from disk, to see if we need to emit any new events.
249
- initialState , err := m .cfg .StateLog .FetchState (ctx , assetSpec )
250
- if err != nil {
251
- return nil , fmt .Errorf ("unable to fetch current state: %w" , err )
252
- }
253
-
254
229
// Create a new error reporter for the state machine.
255
230
errorReporter := NewErrorReporter (assetSpec )
256
231
257
232
fsmCfg := protofsm.StateMachineCfg [Event , * Environment ]{
258
233
ErrorReporter : & errorReporter ,
259
- InitialState : initialState ,
234
+ InitialState : & InitState {} ,
260
235
Env : env ,
261
236
Daemon : m .cfg .DaemonAdapters ,
262
237
}
0 commit comments