if err != nil {
return
}
- bcR.txPool.AddTransaction(tx, block.BlockHeader.Height, uint64(gas))
+ bcR.txPool.AddTransaction(tx, block.BlockHeader.Height, gas)
go bcR.BroadcastTransaction(tx)
default:
bcR.Logger.Error(cmn.Fmt("Unknown message type %v", reflect.TypeOf(msg)))
if err != nil {
return errors.Wrapf(err, "validity of transaction %d of %d", i, len(b.Transactions))
}
- coinbaseValue += uint64(txBTMValue)
+ coinbaseValue += txBTMValue
}
// check the coinbase output entry value
}
// ValidateTx validates a transaction.
-func ValidateTx(tx *bc.Tx, block *bc.Block) (int64, error) {
+func ValidateTx(tx *bc.Tx, block *bc.Block) (uint64, error) {
if tx.TxHeader.SerializedSize > maxTxSize {
return 0, errWrongTransactionSize
}
}
err := checkValid(vs, tx.TxHeader)
- return vs.gas.BTMValue, err
+ return uint64(vs.gas.BTMValue), err
}