Error logging on tx processing

This commit is contained in:
obscuren 2014-02-25 11:21:49 +01:00
parent 507fc7b9d1
commit ce07d9bb4c

View File

@ -92,12 +92,13 @@ func (bm *BlockManager) WatchAddr(addr []byte) *AddressState {
} }
func (bm *BlockManager) GetAddrState(addr []byte) *AddressState { func (bm *BlockManager) GetAddrState(addr []byte) *AddressState {
addrState := bm.addrStateStore.Get(addr) account := bm.addrStateStore.Get(addr)
if addrState == nil { if account == nil {
addrState = bm.WatchAddr(addr) a := bm.bc.CurrentBlock.GetAddr(addr)
account = &AddressState{Nonce: a.Nonce, Account: a}
} }
return addrState return account
} }
func (bm *BlockManager) BlockChain() *BlockChain { func (bm *BlockManager) BlockChain() *BlockChain {
@ -114,7 +115,10 @@ func (bm *BlockManager) ApplyTransactions(block *Block, txs []*Transaction) {
if contract := block.GetContract(tx.Recipient); contract != nil { if contract := block.GetContract(tx.Recipient); contract != nil {
bm.ProcessContract(contract, tx, block) bm.ProcessContract(contract, tx, block)
} else { } else {
bm.TransactionPool.ProcessTransaction(tx, block) err := bm.TransactionPool.ProcessTransaction(tx, block)
if err != nil {
ethutil.Config.Log.Infoln("[BMGR]", err)
}
} }
} }
} }