2021-01-29 14:33:24 +00:00
|
|
|
package blockchainer
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
2021-02-01 16:00:07 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
2021-01-29 14:33:24 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
|
|
)
|
|
|
|
|
|
|
|
// StateRoot represents local state root module.
|
|
|
|
type StateRoot interface {
|
2021-02-01 16:00:07 +00:00
|
|
|
AddStateRoot(root *state.MPTRoot) error
|
2021-08-17 15:16:10 +00:00
|
|
|
CleanStorage() error
|
2021-07-30 13:57:42 +00:00
|
|
|
CurrentLocalHeight() uint32
|
2021-01-29 14:33:24 +00:00
|
|
|
CurrentLocalStateRoot() util.Uint256
|
2021-02-01 16:00:07 +00:00
|
|
|
CurrentValidatedHeight() uint32
|
2021-01-29 14:33:24 +00:00
|
|
|
GetStateProof(root util.Uint256, key []byte) ([][]byte, error)
|
|
|
|
GetStateRoot(height uint32) (*state.MPTRoot, error)
|
2021-02-02 09:34:27 +00:00
|
|
|
GetStateValidators(height uint32) keys.PublicKeys
|
2021-03-03 09:37:06 +00:00
|
|
|
SetUpdateValidatorsCallback(func(uint32, keys.PublicKeys))
|
2021-02-01 16:00:07 +00:00
|
|
|
UpdateStateValidators(height uint32, pubs keys.PublicKeys)
|
2021-01-29 14:33:24 +00:00
|
|
|
}
|