Commit ce07d9bb authored by obscuren's avatar obscuren

Error logging on tx processing

parent 507fc7b9
...@@ -92,12 +92,13 @@ func (bm *BlockManager) WatchAddr(addr []byte) *AddressState { ...@@ -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) { ...@@ -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)
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment