2021-01-29 14:33:24 +00:00
|
|
|
package blockchainer
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
2021-10-07 13:56:27 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/storage"
|
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-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-10-07 13:56:27 +00:00
|
|
|
FindStates(root util.Uint256, prefix, start []byte, max int) ([]storage.KeyValue, error)
|
2021-10-07 09:03:37 +00:00
|
|
|
GetState(root util.Uint256, key []byte) ([]byte, error)
|
2021-01-29 14:33:24 +00:00
|
|
|
GetStateProof(root util.Uint256, key []byte) ([][]byte, error)
|
|
|
|
GetStateRoot(height uint32) (*state.MPTRoot, error)
|
|
|
|
}
|