Merge pull request #766 from nspcc-dev/fix-register-tx-verification

core: add owner hash to verified list for Register TX
This commit is contained in:
Roman Khimov 2020-03-17 11:38:11 +03:00 committed by GitHub
commit a9e5cdd6cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1942,6 +1942,9 @@ func (bc *Blockchain) GetScriptHashesForVerifying(t *transaction.Transaction) ([
case transaction.EnrollmentType: case transaction.EnrollmentType:
etx := t.Data.(*transaction.EnrollmentTX) etx := t.Data.(*transaction.EnrollmentTX)
hashes[etx.PublicKey.GetScriptHash()] = true hashes[etx.PublicKey.GetScriptHash()] = true
case transaction.RegisterType:
reg := t.Data.(*transaction.RegisterTX)
hashes[reg.Owner.GetScriptHash()] = true
case transaction.StateType: case transaction.StateType:
stx := t.Data.(*transaction.StateTX) stx := t.Data.(*transaction.StateTX)
for _, desc := range stx.Descriptors { for _, desc := range stx.Descriptors {