|
@@ -1040,13 +1040,7 @@ func (pool *TxPool) runReorg(done chan struct{}, reset *txpoolResetRequest, dirt
|
|
|
}
|
|
}
|
|
|
// Check for pending transactions for every account that sent new ones
|
|
// Check for pending transactions for every account that sent new ones
|
|
|
promoted := pool.promoteExecutables(promoteAddrs)
|
|
promoted := pool.promoteExecutables(promoteAddrs)
|
|
|
- for _, tx := range promoted {
|
|
|
|
|
- addr, _ := types.Sender(pool.signer, tx)
|
|
|
|
|
- if _, ok := events[addr]; !ok {
|
|
|
|
|
- events[addr] = newTxSortedMap()
|
|
|
|
|
- }
|
|
|
|
|
- events[addr].Put(tx)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
// If a new block appeared, validate the pool of pending transactions. This will
|
|
// If a new block appeared, validate the pool of pending transactions. This will
|
|
|
// remove any transaction that has been included in the block or was invalidated
|
|
// remove any transaction that has been included in the block or was invalidated
|
|
|
// because of another transaction (e.g. higher gas price).
|
|
// because of another transaction (e.g. higher gas price).
|
|
@@ -1065,6 +1059,13 @@ func (pool *TxPool) runReorg(done chan struct{}, reset *txpoolResetRequest, dirt
|
|
|
pool.mu.Unlock()
|
|
pool.mu.Unlock()
|
|
|
|
|
|
|
|
// Notify subsystems for newly added transactions
|
|
// Notify subsystems for newly added transactions
|
|
|
|
|
+ for _, tx := range promoted {
|
|
|
|
|
+ addr, _ := types.Sender(pool.signer, tx)
|
|
|
|
|
+ if _, ok := events[addr]; !ok {
|
|
|
|
|
+ events[addr] = newTxSortedMap()
|
|
|
|
|
+ }
|
|
|
|
|
+ events[addr].Put(tx)
|
|
|
|
|
+ }
|
|
|
if len(events) > 0 {
|
|
if len(events) > 0 {
|
|
|
var txs []*types.Transaction
|
|
var txs []*types.Transaction
|
|
|
for _, set := range events {
|
|
for _, set := range events {
|