mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-30 15:01:35 +00:00
51f405471e
Before state sync process can be started, outdated MPT nodes should be removed from storage. After state sync is completed, outdated blocks/transactions/AERs should also be removed.
21 lines
696 B
Go
21 lines
696 B
Go
package blockchainer
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
)
|
|
|
|
// StateRoot represents local state root module.
|
|
type StateRoot interface {
|
|
AddStateRoot(root *state.MPTRoot) error
|
|
CleanStorage() error
|
|
CurrentLocalHeight() uint32
|
|
CurrentLocalStateRoot() util.Uint256
|
|
CurrentValidatedHeight() uint32
|
|
GetStateProof(root util.Uint256, key []byte) ([][]byte, error)
|
|
GetStateRoot(height uint32) (*state.MPTRoot, error)
|
|
GetStateValidators(height uint32) keys.PublicKeys
|
|
SetUpdateValidatorsCallback(func(uint32, keys.PublicKeys))
|
|
UpdateStateValidators(height uint32, pubs keys.PublicKeys)
|
|
}
|