aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_processor.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-27 01:39:05 +0800
committerobscuren <geffobscura@gmail.com>2015-02-27 01:39:05 +0800
commit37e6870f64437a212fde383ab1538ad1e7e2acd9 (patch)
treefbcd0c11c1ca9931a6a8f6c74ae02340cb097bb2 /core/block_processor.go
parenta1c830cd3c53bce7748d97e3f99fe6a90d526adb (diff)
downloadgo-tangerine-37e6870f64437a212fde383ab1538ad1e7e2acd9.tar
go-tangerine-37e6870f64437a212fde383ab1538ad1e7e2acd9.tar.gz
go-tangerine-37e6870f64437a212fde383ab1538ad1e7e2acd9.tar.bz2
go-tangerine-37e6870f64437a212fde383ab1538ad1e7e2acd9.tar.lz
go-tangerine-37e6870f64437a212fde383ab1538ad1e7e2acd9.tar.xz
go-tangerine-37e6870f64437a212fde383ab1538ad1e7e2acd9.tar.zst
go-tangerine-37e6870f64437a212fde383ab1538ad1e7e2acd9.zip
wip
Diffstat (limited to 'core/block_processor.go')
-rw-r--r--core/block_processor.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index f66d158b2..5e943bda5 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -48,9 +48,8 @@ type BlockProcessor struct {
func NewBlockProcessor(db ethutil.Database, txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor {
sm := &BlockProcessor{
- db: db,
- mem: make(map[string]*big.Int),
- //Pow: &ethash.Ethash{},
+ db: db,
+ mem: make(map[string]*big.Int),
Pow: ezp.New(),
bc: chainManager,
eventMux: eventMux,
@@ -100,7 +99,8 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated
// Notify all subscribers
if !transientProcess {
go self.eventMux.Post(TxPostEvent{tx})
- go self.eventMux.Post(statedb.Logs())
+ logs := statedb.Logs()
+ go self.eventMux.Post(logs)
}
return receipt, txGas, err
@@ -205,6 +205,8 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (td *big
receiptSha := types.DeriveSha(receipts)
if bytes.Compare(receiptSha, header.ReceiptHash) != 0 {
fmt.Println("receipts", receipts)
+ state.Sync()
+ chainlogger.Infof("%s\n", state.Dump())
err = fmt.Errorf("validating receipt root. received=%x got=%x", header.ReceiptHash, receiptSha)
return
}