aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-07 17:55:23 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-07 17:55:23 +0800
commit916d1554675974adb92af4046e1b04ad3b26dca3 (patch)
tree6ab24e55a8b4bd14b3a9c25917d440c03b875bfc /xeth/xeth.go
parentd764bd058457cd9eb91d205d1ac187d40c4866d6 (diff)
parentc5cb6e8e70339b6641b7ce46cda04b83936213b3 (diff)
downloaddexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar
dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.gz
dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.bz2
dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.lz
dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.xz
dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.zst
dexon-916d1554675974adb92af4046e1b04ad3b26dca3.zip
Merge pull request #1429 from obscuren/rebase-registrar
Rebase registrar
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index f2295e6e1..a3923436a 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -203,34 +203,6 @@ func (self *XEth) AtStateNum(num int64) *XEth {
return self.WithState(st)
}
-// applies queued transactions originating from address onto the latest state
-// and creates a block
-// only used in tests
-// - could be removed in favour of mining on testdag (natspec e2e + networking)
-// + filters
-func (self *XEth) ApplyTestTxs(statedb *state.StateDB, address common.Address, txc uint64) (uint64, *XEth) {
- chain := self.backend.ChainManager()
- header := chain.CurrentBlock().Header()
- coinbase := statedb.GetStateObject(address)
- coinbase.SetGasLimit(big.NewInt(10000000))
- txs := self.backend.TxPool().GetQueuedTransactions()
-
- for i := 0; i < len(txs); i++ {
- for _, tx := range txs {
- if tx.Nonce() == txc {
- _, _, err := core.ApplyMessage(core.NewEnv(statedb, self.backend.ChainManager(), tx, header), tx, coinbase)
- if err != nil {
- panic(err)
- }
- txc++
- }
- }
- }
-
- xeth := self.WithState(statedb)
- return txc, xeth
-}
-
func (self *XEth) WithState(statedb *state.StateDB) *XEth {
xeth := &XEth{
backend: self.backend,