From 832c56f97dfce830287e7ffa0b3d8363fe5a66ab Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 30 Sep 2019 16:57:24 +0300 Subject: [PATCH] core: fix DutyFlag check in GetScriptHashesForVerifying() It's a flag (used by Share and Invoice asset types), so it should be checked like a flag, the same way C# node does. --- 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 03e75bedd..c5edaf298 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -899,7 +899,7 @@ func (bc *Blockchain) GetScriptHashesForVerifying(t *transaction.Transaction) ([ if as == nil { return nil, errors.New("Invalid operation") } - if as.AssetType == transaction.DutyFlag { + if as.AssetType&transaction.DutyFlag != 0 { for _, o := range outputs { h := o.ScriptHash if _, ok := hashes[h]; !ok {