Skip to content

Commit 9d52234

Browse files
committed
fix helper for TestStateRecovery
1 parent df8059f commit 9d52234

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

node/helpers.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//nolint:unused
21
package node
32

43
import (
4+
"context"
55
"errors"
66
"fmt"
77
"time"
@@ -75,10 +75,7 @@ func getNodeHeightFromData(node Node) (uint64, error) {
7575

7676
func getNodeHeightFromStore(node Node) (uint64, error) {
7777
if fn, ok := node.(*FullNode); ok {
78-
if fn.blockComponents != nil {
79-
state := fn.blockComponents.GetLastState()
80-
return state.LastBlockHeight, nil
81-
}
78+
return fn.Store.Height(context.Background())
8279
}
8380
return 0, errors.New("not a full node or block components not initialized")
8481
}

0 commit comments

Comments
 (0)