stateroot: use RoleStateValidator for verification

This commit is contained in:
Evgeniy Stratonikov 2021-02-01 19:00:07 +03:00
parent bf20db09e0
commit ac227a80fe
12 changed files with 405 additions and 11 deletions

View file

@ -2,12 +2,16 @@ 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
CurrentLocalStateRoot() util.Uint256
CurrentValidatedHeight() uint32
GetStateProof(root util.Uint256, key []byte) ([][]byte, error)
GetStateRoot(height uint32) (*state.MPTRoot, error)
UpdateStateValidators(height uint32, pubs keys.PublicKeys)
}