Skip to content

Commit 2e2b9a1

Browse files
committed
fix cmd
1 parent dc4f4d3 commit 2e2b9a1

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

cmd/consensus/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ func main() {
621621
notifier.AddFollowerConsumer(followerDistributor)
622622

623623
// initialize the persister
624-
persist, err := persister.New(node.ProtocolDB, node.RootChainID)
624+
persist, err := persister.New(node.ProtocolDB, node.RootChainID, node.StorageLockMgr)
625625
if err != nil {
626626
return nil, err
627627
}

cmd/util/cmd/read-hotstuff/cmd/get_liveness.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ func init() {
2222

2323
func runGetLivenessData(*cobra.Command, []string) {
2424
err := common.WithStorage(flagDatadir, func(db storage.DB) error {
25+
lockManager := storage.NewTestingLockManager()
26+
2527
chainID := flow.ChainID(flagChain)
26-
reader, err := persister.NewReader(db, chainID)
28+
reader, err := persister.NewReader(db, chainID, lockManager)
2729
if err != nil {
2830
log.Fatal().Err(err).Msg("could not create reader from db")
2931
}

cmd/util/cmd/read-hotstuff/cmd/get_safety.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ func init() {
2222

2323
func runGetSafetyData(*cobra.Command, []string) {
2424
err := common.WithStorage(flagDatadir, func(db storage.DB) error {
25+
lockManager := storage.NewTestingLockManager()
2526

2627
chainID := flow.ChainID(flagChain)
27-
reader, err := persister.NewReader(db, chainID)
28+
reader, err := persister.NewReader(db, chainID, lockManager)
2829
if err != nil {
2930
log.Fatal().Err(err).Msg("could not create reader from db")
3031
}

consensus/hotstuff/persister/persister.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55

66
"github.com/jordanschalm/lockctx"
7+
78
"github.com/onflow/flow-go/consensus/hotstuff"
89
"github.com/onflow/flow-go/model/flow"
910
"github.com/onflow/flow-go/storage"

consensus/integration/nodes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ func createNode(
563563

564564
signer := verification.NewCombinedSigner(me, beaconKeyStore)
565565

566-
persist, err := persister.New(db, rootHeader.ChainID)
566+
persist, err := persister.New(db, rootHeader.ChainID, lockManager)
567567
require.NoError(t, err)
568568

569569
livenessData, err := persist.GetLivenessData()

storage/operation/views.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55

66
"github.com/jordanschalm/lockctx"
7+
78
"github.com/onflow/flow-go/consensus/hotstuff"
89
"github.com/onflow/flow-go/model/flow"
910
"github.com/onflow/flow-go/storage"

0 commit comments

Comments
 (0)