diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 160e51db2..4a1fdbc0c 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -1283,7 +1283,8 @@ func (bc *Blockchain) verifyTx(t *transaction.Transaction, block *block.Block) e } } - if t.Type == transaction.ClaimType { + switch t.Type { + case transaction.ClaimType: claim := t.Data.(*transaction.ClaimTX) if transaction.HaveDuplicateInputs(claim.Claims) { return errors.New("duplicate claims") @@ -1294,6 +1295,11 @@ func (bc *Blockchain) verifyTx(t *transaction.Transaction, block *block.Block) e if err := bc.verifyClaims(t); err != nil { return err } + case transaction.InvocationType: + inv := t.Data.(*transaction.InvocationTX) + if inv.Gas.FractionalValue() != 0 { + return errors.New("invocation gas can only be integer") + } } return bc.verifyTxWitnesses(t, block)