aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-25 18:21:49 +0800
committerobscuren <geffobscura@gmail.com>2014-02-25 18:21:49 +0800
commitce07d9bb4c95a118636c4b71e9cba2d81540c4a5 (patch)
tree398ca0f5f4f6686db1f385494666518d8e8cf77a
parent507fc7b9d1e227de91b25e18891c4cd44452b222 (diff)
downloadgo-tangerine-ce07d9bb4c95a118636c4b71e9cba2d81540c4a5.tar
go-tangerine-ce07d9bb4c95a118636c4b71e9cba2d81540c4a5.tar.gz
go-tangerine-ce07d9bb4c95a118636c4b71e9cba2d81540c4a5.tar.bz2
go-tangerine-ce07d9bb4c95a118636c4b71e9cba2d81540c4a5.tar.lz
go-tangerine-ce07d9bb4c95a118636c4b71e9cba2d81540c4a5.tar.xz
go-tangerine-ce07d9bb4c95a118636c4b71e9cba2d81540c4a5.tar.zst
go-tangerine-ce07d9bb4c95a118636c4b71e9cba2d81540c4a5.zip
Error logging on tx processing
-rw-r--r--ethchain/block_manager.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/ethchain/block_manager.go b/ethchain/block_manager.go
index 04036dbb1..364a06158 100644
--- a/ethchain/block_manager.go
+++ b/ethchain/block_manager.go
@@ -92,12 +92,13 @@ func (bm *BlockManager) WatchAddr(addr []byte) *AddressState {
}
func (bm *BlockManager) GetAddrState(addr []byte) *AddressState {
- addrState := bm.addrStateStore.Get(addr)
- if addrState == nil {
- addrState = bm.WatchAddr(addr)
+ account := bm.addrStateStore.Get(addr)
+ if account == nil {
+ a := bm.bc.CurrentBlock.GetAddr(addr)
+ account = &AddressState{Nonce: a.Nonce, Account: a}
}
- return addrState
+ return account
}
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 {
bm.ProcessContract(contract, tx, block)
} else {
- bm.TransactionPool.ProcessTransaction(tx, block)
+ err := bm.TransactionPool.ProcessTransaction(tx, block)
+ if err != nil {
+ ethutil.Config.Log.Infoln("[BMGR]", err)
+ }
}
}
}