aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-23 22:43:41 +0800
committerobscuren <geffobscura@gmail.com>2015-02-23 22:43:41 +0800
commitb2a225a52e45315f3ec90e11707fefa6059d13f5 (patch)
tree7019227fc4af5e39f88bcc58ddc455826df8d569 /xeth
parent20aa6dde067a0c8d28fdafd43e41f996f014e8b0 (diff)
downloadgo-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar
go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.gz
go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.bz2
go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.lz
go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.xz
go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.zst
go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.zip
Properly uninstall filters. Mining issue fixed #closes #365
* Added an additional tx state which is used to get the current nonce * Refresh transient state each time a new canonical block is found * Properly uninstall filters. Fixes a possible crash in RPC
Diffstat (limited to 'xeth')
-rw-r--r--xeth/xeth.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 5907a8329..2985ce982 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -277,7 +277,7 @@ func (self *XEth) Transact(toStr, valueStr, gasStr, gasPriceStr, codeStr string)
}
var err error
- state := self.eth.ChainManager().TransState()
+ state := self.eth.ChainManager().TxState()
if balance := state.GetBalance(key.Address()); balance.Cmp(tx.Value()) < 0 {
return "", fmt.Errorf("insufficient balance. balance=%v tx=%v", balance, tx.Value())
}
@@ -289,10 +289,10 @@ func (self *XEth) Transact(toStr, valueStr, gasStr, gasPriceStr, codeStr string)
//fmt.Printf("create tx: %x %v\n", tx.Hash()[:4], tx.Nonce())
// Do some pre processing for our "pre" events and hooks
- block := self.chainManager.NewBlock(key.Address())
- coinbase := state.GetOrNewStateObject(key.Address())
- coinbase.SetGasPool(block.GasLimit())
- self.blockProcessor.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true)
+ //block := self.chainManager.NewBlock(key.Address())
+ //coinbase := state.GetOrNewStateObject(key.Address())
+ //coinbase.SetGasPool(block.GasLimit())
+ //self.blockProcessor.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true)
err = self.eth.TxPool().Add(tx)
if err != nil {