Hot fixed for bug can't deploy smart contract to master node.

This commit is contained in:
dinhln89 2018-06-19 14:31:17 +07:00
parent 2dfb27bcda
commit 458bb39287

View file

@ -586,7 +586,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 { if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 {
return ErrInsufficientFunds return ErrInsufficientFunds
} }
if tx.To().String() != common.BlockSigners { if tx.To() != nil && tx.To().String() != common.BlockSigners {
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