pool: else ifs instead of ifs

This commit is contained in:
emailtovamos 2024-09-18 13:04:29 +01:00
parent 774e314096
commit 629af6dab4

@ -971,8 +971,7 @@ func (pool *LegacyPool) addToPool12OrPool3(tx *types.Transaction, from common.Ad
pool.beats[from] = time.Now()
return true, nil
}
if pool2 {
} else if pool2 {
pool.journalTx(from, tx)
pool.queueTxEvent(tx, true)
_, err := pool.enqueueTx(tx.Hash(), tx, isLocal, true, true)
@ -990,8 +989,7 @@ func (pool *LegacyPool) addToPool12OrPool3(tx *types.Transaction, from common.Ad
// Successful promotion, bump the heartbeat
pool.beats[from] = time.Now()
return true, nil
}
if pool3 {
} else if pool3 {
pool.localBufferPool.Add(tx)
log.Debug("adding to pool3", "transaction", tx.Hash().String())
return true, nil