aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/blocktest
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-11 01:50:13 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-11 01:50:13 +0800
commit617804c32731c5103319e7072557f62a9ce63836 (patch)
treebaca8a8f2e014892983ca45e8ec618ab54121526 /cmd/blocktest
parent3de51f76eea87f8e8a4b8a7277cd294529e28491 (diff)
parentbbe8b186600992ada6da9e75e9976cd5a9dc0ae3 (diff)
downloaddexon-617804c32731c5103319e7072557f62a9ce63836.tar
dexon-617804c32731c5103319e7072557f62a9ce63836.tar.gz
dexon-617804c32731c5103319e7072557f62a9ce63836.tar.bz2
dexon-617804c32731c5103319e7072557f62a9ce63836.tar.lz
dexon-617804c32731c5103319e7072557f62a9ce63836.tar.xz
dexon-617804c32731c5103319e7072557f62a9ce63836.tar.zst
dexon-617804c32731c5103319e7072557f62a9ce63836.zip
Merge branch 'rpcfrontier' of github.com:ethereum/go-ethereum into rpcfrontier
Diffstat (limited to 'cmd/blocktest')
-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)