aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/test/state.go')
-rw-r--r--core/test/state.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/test/state.go b/core/test/state.go
index f1cf365..fbf4505 100644
--- a/core/test/state.go
+++ b/core/test/state.go
@@ -117,6 +117,7 @@ type State struct {
// - node set
// - crs
func NewState(
+ dkgDelayRound uint64,
nodePubKeys []crypto.PublicKey,
lambda time.Duration,
logger common.Logger,
@@ -126,6 +127,11 @@ func NewState(
nodes[types.NewNodeID(key)] = key
}
genesisCRS := crypto.Keccak256Hash([]byte("__ DEXON"))
+ crs := make([]common.Hash, dkgDelayRound+1)
+ for i := range crs {
+ crs[i] = genesisCRS
+ genesisCRS = crypto.Keccak256Hash(genesisCRS[:])
+ }
return &State{
local: local,
logger: logger,
@@ -133,7 +139,7 @@ func NewState(
lambdaDKG: lambda * 10,
roundInterval: 1000,
minBlockInterval: 4 * lambda,
- crs: []common.Hash{genesisCRS},
+ crs: crs,
nodes: nodes,
notarySetSize: uint32(len(nodes)),
dkgSetSize: uint32(len(nodes)),