Skip to content

Commit b128bff

Browse files
author
colinlyguo
committed
simplify
1 parent 9d67639 commit b128bff

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

core/tx_pool.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,17 +1533,14 @@ func (pool *TxPool) reset(oldHead, newHead *types.Header) {
15331533
}
15341534
reinject = types.TxDifference(discarded, included)
15351535

1536-
if len(discarded) > 0 {
1537-
for _, tx := range discarded {
1538-
log.Debug("TXPOOL_REORG: TX removed from old chain", "hash", tx.Hash().Hex())
1539-
}
1536+
for _, tx := range discarded {
1537+
log.Debug("TXPOOL_REORG: TX removed from old chain", "hash", tx.Hash().Hex())
15401538
}
15411539

1542-
if len(included) > 0 {
1543-
for _, tx := range included {
1544-
log.Debug("TXPOOL_REORG: TX added in the chain", "hash", tx.Hash().Hex())
1545-
}
1540+
for _, tx := range included {
1541+
log.Debug("TXPOOL_REORG: TX added in the chain", "hash", tx.Hash().Hex())
15461542
}
1543+
15471544
}
15481545
}
15491546
}

0 commit comments

Comments
 (0)