aboutsummaryrefslogtreecommitdiffstats
path: root/core/leader-selector_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/leader-selector_test.go')
-rw-r--r--core/leader-selector_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/leader-selector_test.go b/core/leader-selector_test.go
index 07e561a..975fd13 100644
--- a/core/leader-selector_test.go
+++ b/core/leader-selector_test.go
@@ -46,7 +46,9 @@ func (s *LeaderSelectorTestSuite) SetupTest() {
}
func (s *LeaderSelectorTestSuite) newLeader() *leaderSelector {
- return newLeaderSelector(common.NewRandomHash(), s.mockValidLeader)
+ l := newLeaderSelector(s.mockValidLeader)
+ l.restart(common.NewRandomHash())
+ return l
}
func (s *LeaderSelectorTestSuite) TestDistance() {
@@ -138,7 +140,7 @@ func (s *LeaderSelectorTestSuite) TestValidLeaderFn() {
blockHash := leader.leaderBlockHash()
s.mockValidLeaderDB[blockHash] = false
- leader.restart()
+ leader.restart(leader.hashCRS)
for _, b := range blocks {
s.Require().NoError(leader.processBlock(b))
}