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-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
|
|
|
}
|