This commit is contained in:
obscuren
2015-06-03 13:14:06 +02:00
parent b26f5e0bb7
commit 770a0e7839
3 changed files with 69 additions and 10 deletions

View File

@ -178,7 +178,6 @@ func (sm *BlockProcessor) Process(block *types.Block) (logs state.Logs, err erro
return nil, ParentError(header.ParentHash)
}
parent := sm.bc.GetBlock(header.ParentHash)
return sm.processWithParent(block, parent)
}
@ -254,14 +253,9 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs st
return nil, err
}
// Calculate the td for this block
//td = CalculateTD(block, parent)
// Sync the current block's state to the database
state.Sync()
// Remove transactions from the pool
sm.txpool.RemoveTransactions(block.Transactions())
// This puts transactions in a extra db for rpc
for i, tx := range block.Transactions() {
putTx(sm.extraDb, tx, block, uint64(i))