aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-03-20 01:07:09 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-03-24 06:02:44 +0800
commit0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd (patch)
treeaaeae000f0afdba0b78a53462150bd79a2e3c54b /core
parent5f92606be2f7ddc53c9449770f5c96e5741e5c57 (diff)
downloadgo-tangerine-0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd.tar
go-tangerine-0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd.tar.gz
go-tangerine-0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd.tar.bz2
go-tangerine-0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd.tar.lz
go-tangerine-0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd.tar.xz
go-tangerine-0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd.tar.zst
go-tangerine-0cfa21fc7f34d9da93abc41541dd4a98d70eb9dd.zip
core, eth, cmd: temporary work around for enabling the jit
This commit serves as a temporary workaround for enabling the jit until the block customisation PR is merged in.
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index cecb914a8..2c3c2bb5c 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -84,6 +84,7 @@ type BlockChain struct {
chainDb ethdb.Database
eventMux *event.TypeMux
genesisBlock *types.Block
+ vmConfig *vm.Config
mu sync.RWMutex // global mutex for locking chain operations
chainmu sync.RWMutex // blockchain insertion lock
@@ -162,6 +163,10 @@ func NewBlockChain(chainDb ethdb.Database, pow pow.PoW, mux *event.TypeMux) (*Bl
return bc, nil
}
+func (self *BlockChain) SetConfig(vmConfig *vm.Config) {
+ self.vmConfig = vmConfig
+}
+
func (self *BlockChain) getProcInterrupt() bool {
return atomic.LoadInt32(&self.procInterrupt) == 1
}
@@ -891,7 +896,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
return i, err
}
// Process block using the parent state as reference point.
- receipts, logs, usedGas, err := self.processor.Process(block, statedb, nil)
+ receipts, logs, usedGas, err := self.processor.Process(block, statedb, self.vmConfig)
if err != nil {
reportBlock(block, err)
return i, err