aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_processor_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-08 18:12:13 +0800
committerobscuren <geffobscura@gmail.com>2015-06-09 00:33:43 +0800
commit6244b10a8f74d92addf977994e5a9c0e457229bb (patch)
tree30ad7e939d001e8a1400b76e4403546777c9f3aa /core/block_processor_test.go
parentc6faa18ec9630066683548ed410e364555fd838d (diff)
downloaddexon-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.gz
dexon-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.zst
dexon-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.go7
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
}