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.
This commit is contained in:
Roman Khimov 2019-09-30 16:57:24 +03:00
parent 4ae18e8ffc
commit 832c56f97d

View file

@ -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 {