forked from TrueCloudLab/neoneo-go
core: take into account NotaryAssisted attributes during verification
It's a bug, we have to reserve proper amount of GAS from verification gas limit for NotaryAssisted attributes.
This commit is contained in:
parent
6d357c3793
commit
501c0c93c6
1 changed files with 7 additions and 0 deletions
|
@ -1695,6 +1695,13 @@ func (bc *Blockchain) verifyTxWitnesses(t *transaction.Transaction, block *block
|
|||
}
|
||||
interopCtx := bc.newInteropContext(trigger.Verification, bc.dao, block, t)
|
||||
gasLimit := t.NetworkFee - int64(t.Size())*bc.FeePerByte()
|
||||
if bc.P2PSigExtensionsEnabled() {
|
||||
attrs := t.GetAttributes(transaction.NotaryAssistedT)
|
||||
if len(attrs) != 0 {
|
||||
na := attrs[0].Value.(*transaction.NotaryAssisted)
|
||||
gasLimit -= (int64(na.NKeys) + 1) * transaction.NotaryServiceFeePerKey
|
||||
}
|
||||
}
|
||||
for i := range t.Signers {
|
||||
gasConsumed, err := bc.verifyHashAgainstScript(t.Signers[i].Account, &t.Scripts[i], interopCtx, gasLimit)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue