aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/blocktest/main.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-10 19:39:59 +0800
committerobscuren <geffobscura@gmail.com>2015-03-10 19:39:59 +0800
commit53f8f297449e2d53154a4ee7f71662d7c300ce77 (patch)
tree06ecea60f439be55b758b52ec318c90e01a42b5c /cmd/blocktest/main.go
parenta7538d0020d3a51ab3b25997b3c4f01db87d4c7a (diff)
parent0542df941f57a75fa7b699089db1d9ae40e4ff71 (diff)
downloadgo-tangerine-53f8f297449e2d53154a4ee7f71662d7c300ce77.tar
go-tangerine-53f8f297449e2d53154a4ee7f71662d7c300ce77.tar.gz
go-tangerine-53f8f297449e2d53154a4ee7f71662d7c300ce77.tar.bz2
go-tangerine-53f8f297449e2d53154a4ee7f71662d7c300ce77.tar.lz
go-tangerine-53f8f297449e2d53154a4ee7f71662d7c300ce77.tar.xz
go-tangerine-53f8f297449e2d53154a4ee7f71662d7c300ce77.tar.zst
go-tangerine-53f8f297449e2d53154a4ee7f71662d7c300ce77.zip
Merge branch 'develop' into rpcfrontier
Diffstat (limited to 'cmd/blocktest/main.go')
-rw-r--r--cmd/blocktest/main.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/cmd/blocktest/main.go b/cmd/blocktest/main.go
index 4a05b8bee..579aa850a 100644
--- a/cmd/blocktest/main.go
+++ b/cmd/blocktest/main.go
@@ -168,7 +168,7 @@ func main() {
logger.Flush()
}()
- utils.HandleInterrupt()
+ //utils.HandleInterrupt()
utils.InitConfig(VmType, ConfigFile, Datadir, "ethblocktest")
@@ -190,12 +190,17 @@ func main() {
MinerThreads: MinerThreads,
})
+ utils.StartEthereumForTest(ethereum)
utils.StartRpc(ethereum, RpcListenAddress, RpcPort)
- utils.StartEthereum(ethereum)
ethereum.ChainManager().ResetWithGenesisBlock(blocks[0])
+ // bph := ethereum.ChainManager().GetBlock(blocks[1].Header().ParentHash)
+ // fmt.Println("bph: ", bph)
- // fmt.Println("HURR: ", hex.EncodeToString(ethutil.Encode(blocks[0].RlpData())))
+ //fmt.Println("b0: ", hex.EncodeToString(ethutil.Encode(blocks[0].RlpData())))
+ //fmt.Println("b0: ", hex.EncodeToString(blocks[0].Hash()))
+ //fmt.Println("b1: ", hex.EncodeToString(ethutil.Encode(blocks[1].RlpData())))
+ //fmt.Println("b1: ", hex.EncodeToString(blocks[1].Hash()))
go ethereum.ChainManager().InsertChain(types.Blocks{blocks[1]})
fmt.Println("OK! ")
@@ -254,6 +259,9 @@ func loadBlocksFromTestFile(filePath string) (blocks types.Blocks, err error) {
}
gb := types.NewBlockWithHeader(gbh)
+ //gb.uncles = *new([]*types.Header)
+ //gb.transactions = *new(types.Transactions)
+ gb.Td = new(big.Int)
gb.Reward = new(big.Int)
testBlock := new(types.Block)