diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-08 18:12:13 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-09 00:33:43 +0800 |
commit | 6244b10a8f74d92addf977994e5a9c0e457229bb (patch) | |
tree | 30ad7e939d001e8a1400b76e4403546777c9f3aa /core/block_processor_test.go | |
parent | c6faa18ec9630066683548ed410e364555fd838d (diff) | |
download | go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.gz go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.zst go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.zip |
core: settable genesis nonce
You can set the nonce of the block with `--genesisnonce`. When the
genesis nonce changes and it doesn't match with the first block in your
database it will fail. A new `datadir` must be given if the nonce of the
genesis block changes.
Diffstat (limited to 'core/block_processor_test.go')
-rw-r--r-- | core/block_processor_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/block_processor_test.go b/core/block_processor_test.go index b52c3d3f8..97b80038d 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -1,6 +1,7 @@ package core import ( + "fmt" "math/big" "testing" @@ -16,7 +17,11 @@ func proc() (*BlockProcessor, *ChainManager) { db, _ := ethdb.NewMemDatabase() var mux event.TypeMux - chainMan := NewChainManager(db, db, thePow(), &mux) + genesis := GenesisBlock(0, db) + chainMan, err := NewChainManager(genesis, db, db, thePow(), &mux) + if err != nil { + fmt.Println(err) + } return NewBlockProcessor(db, db, ezp.New(), chainMan, &mux), chainMan } |