2022-01-12 21:20:03 +00:00
|
|
|
package network
|
2021-07-30 13:57:42 +00:00
|
|
|
|
|
|
|
import (
|
2022-01-12 21:20:03 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/blockchainer"
|
2021-07-30 13:57:42 +00:00
|
|
|
"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
|
2022-01-12 21:20:03 +00:00
|
|
|
blockchainer.Blockqueuer // Blockqueuer interface
|
2021-07-30 13:57:42 +00:00
|
|
|
Init(currChainHeight uint32) error
|
|
|
|
IsActive() bool
|
|
|
|
IsInitialized() bool
|
2021-08-13 09:46:23 +00:00
|
|
|
GetUnknownMPTNodesBatch(limit int) []util.Uint256
|
2021-07-30 13:57:42 +00:00
|
|
|
NeedHeaders() bool
|
|
|
|
NeedMPTNodes() bool
|
|
|
|
Traverse(root util.Uint256, process func(node mpt.Node, nodeBytes []byte) bool) error
|
|
|
|
}
|