From 8a2130f5b62ae75131c59b1cc26836e21a750dad Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 30 Mar 2020 11:16:53 +0300 Subject: [PATCH] core: extend Blockchainer with GetStandByValidators() A list of standby validators can be needed in native contracts. --- pkg/core/blockchainer/blockchainer.go | 1 + pkg/network/helper_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pkg/core/blockchainer/blockchainer.go b/pkg/core/blockchainer/blockchainer.go index 1e368f90f..0393a4059 100644 --- a/pkg/core/blockchainer/blockchainer.go +++ b/pkg/core/blockchainer/blockchainer.go @@ -37,6 +37,7 @@ type Blockchainer interface { GetNEP5TransferLog(util.Uint160) *state.NEP5TransferLog GetNEP5Balances(util.Uint160) *state.NEP5Balances GetValidators(txes ...*transaction.Transaction) ([]*keys.PublicKey, error) + GetStandByValidators() (keys.PublicKeys, error) GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error) GetStorageItem(scripthash util.Uint160, key []byte) *state.StorageItem GetStorageItems(hash util.Uint160) (map[string]*state.StorageItem, error) diff --git a/pkg/network/helper_test.go b/pkg/network/helper_test.go index 25e1fed7d..48db395a7 100644 --- a/pkg/network/helper_test.go +++ b/pkg/network/helper_test.go @@ -99,6 +99,9 @@ func (chain testChain) GetNEP5Balances(util.Uint160) *state.NEP5Balances { func (chain testChain) GetValidators(...*transaction.Transaction) ([]*keys.PublicKey, error) { panic("TODO") } +func (chain testChain) GetStandByValidators() (keys.PublicKeys, error) { + panic("TODO") +} func (chain testChain) GetEnrollments() ([]*state.Validator, error) { panic("TODO") }