mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
0e0b55350a
We don't need this method to be exposed, the only its user is the StateSync module. At the same time StateSync module manages its state by itself which guarantees that (*Blockchain).jumpToState will be called with proper StateSync stage.
19 lines
511 B
Go
19 lines
511 B
Go
package blockchainer
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/core/mpt"
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
)
|
|
|
|
// StateSync represents state sync module.
|
|
type StateSync interface {
|
|
AddMPTNodes([][]byte) error
|
|
Blockqueuer // Blockqueuer interface
|
|
Init(currChainHeight uint32) error
|
|
IsActive() bool
|
|
IsInitialized() bool
|
|
GetUnknownMPTNodesBatch(limit int) []util.Uint256
|
|
NeedHeaders() bool
|
|
NeedMPTNodes() bool
|
|
Traverse(root util.Uint256, process func(node mpt.Node, nodeBytes []byte) bool) error
|
|
}
|