From de5215a564ed832dcd6b42826fe0fb5d342a2e46 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 28 Feb 2020 11:08:46 +0300 Subject: [PATCH] core: use GetAccountStateOrNew() in (*Blockchain).GetValidators() Target of the transaction output may not yet exist in database. --- pkg/core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 8011a2af8..a7d8c0f5b 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -1580,7 +1580,7 @@ func (bc *Blockchain) GetValidators(txes ...*transaction.Transaction) ([]*keys.P for _, tx := range txes { // iterate through outputs for index, output := range tx.Outputs { - accountState, err := cache.GetAccountState(output.ScriptHash) + accountState, err := cache.GetAccountStateOrNew(output.ScriptHash) if err != nil { return nil, err }