From d5e6028c13c0411ffd71db9a10313166a526569e Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 21 Feb 2020 20:04:16 +0300 Subject: [PATCH] core: add validator public key into the list of hashes to verify That should be done for Enrollment transactions. --- pkg/core/blockchain.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index a75021378..15f5192a7 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -1547,6 +1547,10 @@ func (bc *Blockchain) GetScriptHashesForVerifying(t *transaction.Transaction) ([ } } } + if t.Type == transaction.EnrollmentType { + etx := t.Data.(*transaction.EnrollmentTX) + hashes[etx.PublicKey.GetScriptHash()] = true + } // convert hashes to []util.Uint160 hashesResult := make([]util.Uint160, 0, len(hashes)) for h := range hashes {