core: implemented a queued approach processing transactions

Implemented a new transaction queue. Transactions with a holes in their
nonce sequence are also not propagated over the network.

N: 0,1,2,5,6,7 = propagate 0..2 -- 5..N is kept in the tx pool
This commit is contained in:
obscuren
2015-04-21 22:01:04 +02:00
parent 2fe54ab233
commit 498b24270a
3 changed files with 123 additions and 25 deletions

View File

@ -258,7 +258,7 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs st
state.Sync()
// Remove transactions from the pool
sm.txpool.RemoveSet(block.Transactions())
sm.txpool.RemoveTransactions(block.Transactions())
// This puts transactions in a extra db for rpc
for i, tx := range block.Transactions() {