From 62cfec3787c0b0b6f0d20855dd6b79e264aeb57b Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 11 Jun 2018 10:56:46 -0400 Subject: [PATCH] updates for dustin --- core/blockchain.go | 3 ++- eth/api_tracer.go | 8 +++----- miner/worker.go | 4 +++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index cb72402654..d81f262abc 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -901,7 +901,8 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types. if err := WriteBlock(batch, block); err != nil { return NonStatTy, err } - // @NOTE:SHYFT - Write block data for block explorer + // NOTE:SHYFT - Write block data for block explorer + fmt.Printf("\n\t[BLOCKCHAIN.GO bc.chainConfig] %+v", bc.chainConfig) if err := shyftdb.WriteBlock(block, receipts); err != nil { return NonStatTy, err } diff --git a/eth/api_tracer.go b/eth/api_tracer.go index e639bba33a..fa6af256ad 100644 --- a/eth/api_tracer.go +++ b/eth/api_tracer.go @@ -532,11 +532,9 @@ func (api *PrivateDebugAPI) computeStateDB(block *types.Block, reexec uint64) (* // TraceTransaction returns the structured logs created during the execution of EVM // and returns them as a JSON object. func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error) { - fmt.Println("\n\n\t[API LOG]", api, "\n") - fmt.Printf("%+v\n", api.config) - fmt.Println("\n") - fmt.Printf("%+v\n", api.eth) - fmt.Println("\n") + // NOTE:SHYFT + fmt.Printf("\n\t[API_TRACER.GO api.config] %+v", api.config) + fmt.Printf("\n\t[API_TRACER.GO api.eth] %+v\n", api.eth) // Retrieve the transaction and assemble its EVM context tx, blockHash, _, index := core.GetTransaction(api.eth.ChainDb(), hash) if tx == nil { diff --git a/miner/worker.go b/miner/worker.go index 15395ae0b9..cfbc9c5377 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -309,7 +309,9 @@ func (self *worker) wait() { for _, log := range work.state.Logs() { log.BlockHash = block.Hash() } - stat, err := self.chain.WriteBlockWithState(block, work.receipts, work.state) + fmt.Printf("\n\t[WORKER.GO self.eth] %+v\n", self.eth) + // NOTE:SHYFT Added eth to writeBlockWithState + stat, err := self.chain.WriteBlockWithState(block, work.receipts, work.state, self.eth) if err != nil { log.Error("Failed writing block to chain", "err", err) continue