Merge pull request #361 from dinhln89/gas-zero

Fixed bug not validate zero gas price for tx deploy SMC.
This commit is contained in:
Tuna 2018-12-25 22:34:10 +07:00 committed by GitHub
commit fd287bc9e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -605,7 +605,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
return ErrInsufficientFunds return ErrInsufficientFunds
} }
if tx.To() != nil && !tx.IsSpecialTransaction() { if tx.To() == nil || (tx.To() != nil && !tx.IsSpecialTransaction()) {
intrGas, err := IntrinsicGas(tx.Data(), tx.To() == nil, pool.homestead) intrGas, err := IntrinsicGas(tx.Data(), tx.To() == nil, pool.homestead)
if err != nil { if err != nil {
return err return err