forked from TrueCloudLab/neoneo-go
core: export GetContractState/GetScriptHashesForVerifying via Blockchainer
These are gonna be used by interops and are also useful in general.
This commit is contained in:
parent
19fd7f844e
commit
8266a5ce19
2 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,7 @@ type Blockchainer interface {
|
||||||
BlockHeight() uint32
|
BlockHeight() uint32
|
||||||
HeaderHeight() uint32
|
HeaderHeight() uint32
|
||||||
GetBlock(hash util.Uint256) (*Block, error)
|
GetBlock(hash util.Uint256) (*Block, error)
|
||||||
|
GetContractState(hash util.Uint160) *ContractState
|
||||||
GetHeaderHash(int) util.Uint256
|
GetHeaderHash(int) util.Uint256
|
||||||
GetHeader(hash util.Uint256) (*Header, error)
|
GetHeader(hash util.Uint256) (*Header, error)
|
||||||
CurrentHeaderHash() util.Uint256
|
CurrentHeaderHash() util.Uint256
|
||||||
|
@ -23,6 +24,7 @@ type Blockchainer interface {
|
||||||
HasTransaction(util.Uint256) bool
|
HasTransaction(util.Uint256) bool
|
||||||
GetAssetState(util.Uint256) *AssetState
|
GetAssetState(util.Uint256) *AssetState
|
||||||
GetAccountState(util.Uint160) *AccountState
|
GetAccountState(util.Uint160) *AccountState
|
||||||
|
GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error)
|
||||||
GetStorageItem(scripthash util.Uint160, key []byte) *StorageItem
|
GetStorageItem(scripthash util.Uint160, key []byte) *StorageItem
|
||||||
GetStorageItems(hash util.Uint160) (map[string]*StorageItem, error)
|
GetStorageItems(hash util.Uint160) (map[string]*StorageItem, error)
|
||||||
GetTransaction(util.Uint256) (*transaction.Transaction, uint32, error)
|
GetTransaction(util.Uint256) (*transaction.Transaction, uint32, error)
|
||||||
|
|
|
@ -56,6 +56,9 @@ func (chain testChain) HeaderHeight() uint32 {
|
||||||
func (chain testChain) GetBlock(hash util.Uint256) (*core.Block, error) {
|
func (chain testChain) GetBlock(hash util.Uint256) (*core.Block, error) {
|
||||||
panic("TODO")
|
panic("TODO")
|
||||||
}
|
}
|
||||||
|
func (chain testChain) GetContractState(hash util.Uint160) *core.ContractState {
|
||||||
|
panic("TODO")
|
||||||
|
}
|
||||||
func (chain testChain) GetHeaderHash(int) util.Uint256 {
|
func (chain testChain) GetHeaderHash(int) util.Uint256 {
|
||||||
return util.Uint256{}
|
return util.Uint256{}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +72,9 @@ func (chain testChain) GetAssetState(util.Uint256) *core.AssetState {
|
||||||
func (chain testChain) GetAccountState(util.Uint160) *core.AccountState {
|
func (chain testChain) GetAccountState(util.Uint160) *core.AccountState {
|
||||||
panic("TODO")
|
panic("TODO")
|
||||||
}
|
}
|
||||||
|
func (chain testChain) GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error) {
|
||||||
|
panic("TODO")
|
||||||
|
}
|
||||||
func (chain testChain) GetStorageItem(scripthash util.Uint160, key []byte) *core.StorageItem {
|
func (chain testChain) GetStorageItem(scripthash util.Uint160, key []byte) *core.StorageItem {
|
||||||
panic("TODO")
|
panic("TODO")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue