good morning!!!!

Skip to content
Snippets Groups Projects
Commit 52b1d094 authored by Wenbiao Zheng's avatar Wenbiao Zheng Committed by Péter Szilágyi
Browse files

core: reduce nesting in transaction pool code (#16980)

parent 9402f965
No related branches found
No related tags found
No related merge requests found
......@@ -815,11 +815,9 @@ func (pool *TxPool) addTxsLocked(txs []*types.Transaction, local bool) []error {
for i, tx := range txs {
var replace bool
if replace, errs[i] = pool.add(tx, local); errs[i] == nil {
if !replace {
from, _ := types.Sender(pool.signer, tx) // already validated
dirty[from] = struct{}{}
}
if replace, errs[i] = pool.add(tx, local); errs[i] == nil && !replace {
from, _ := types.Sender(pool.signer, tx) // already validated
dirty[from] = struct{}{}
}
}
// Only reprocess the internal state if something was actually added
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment