Changed the way transactions are being added to the transaction pool

This commit is contained in:
obscuren
2014-12-01 20:18:09 +01:00
parent a3559c5e1b
commit 6dc46d3341
15 changed files with 239 additions and 98 deletions

View File

@ -430,7 +430,13 @@ func (p *Peer) HandleInbound() {
// processing when a new block is found
for i := 0; i < msg.Data.Len(); i++ {
tx := chain.NewTransactionFromValue(msg.Data.Get(i))
p.ethereum.TxPool().QueueTransaction(tx)
err := p.ethereum.TxPool().Add(tx)
if err != nil {
peerlogger.Infoln(err)
} else {
peerlogger.Infof("tx OK (%x)\n", tx.Hash()[0:4])
}
//p.ethereum.TxPool().QueueTransaction(tx)
}
case wire.MsgGetPeersTy:
// Peer asked for list of connected peers