aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-07-06 02:19:42 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-07 16:43:49 +0800
commit1208ac83d5a93214f23bf3f9236e29869ee62407 (patch)
tree28d07022d6fbda7a4cf9478ae7341c217ff200f1 /xeth
parentaa22cf323ef408f0562817352f68197f8b982f75 (diff)
downloadgo-tangerine-1208ac83d5a93214f23bf3f9236e29869ee62407.tar
go-tangerine-1208ac83d5a93214f23bf3f9236e29869ee62407.tar.gz
go-tangerine-1208ac83d5a93214f23bf3f9236e29869ee62407.tar.bz2
go-tangerine-1208ac83d5a93214f23bf3f9236e29869ee62407.tar.lz
go-tangerine-1208ac83d5a93214f23bf3f9236e29869ee62407.tar.xz
go-tangerine-1208ac83d5a93214f23bf3f9236e29869ee62407.tar.zst
go-tangerine-1208ac83d5a93214f23bf3f9236e29869ee62407.zip
fix natspec test
* registar url string retrieval chop leading zeros now * rewrite test using test mining * remove temporary applyTxs from xeth
Diffstat (limited to 'xeth')
-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,