Update tx_pool.go

This commit is contained in:
ywzqwwt 2019-07-03 11:20:14 +08:00 committed by GitHub
parent 8deba6f99a
commit 8ee274962b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,7 +328,7 @@ func (pool *TxPool) loop() {
head = ev.Block
}
// Be unsubscribed due to system stopped
// System shutdown.
case <-pool.chainHeadSub.Err():
close(pool.reorgShutdownCh)
return
@ -526,7 +526,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
}
// Drop non-local transactions under our own minimal accepted gas price
local = local || pool.locals.contains(from) // account may be local even if the transaction arrived from the network
if !local && pool.gasPrice.Cmp(tx.GasPrice()) > 0 || tx.GasPrice().Cmp(big.NewInt(0)) < 1 {
if !local && pool.gasPrice.Cmp(tx.GasPrice()) > 0 {
return ErrUnderpriced
}
// Ensure the transaction adheres to nonce ordering