Skip to content

Commit

Permalink
Remove unused logger parameter in snapshot init
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Pavlovic <[email protected]>
  • Loading branch information
matejpavlovic committed Jan 16, 2023
1 parent 05c35da commit 9859950
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/bench/cmd/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func runNode() error {
}

localCrypto := deploytest.NewLocalCryptoSystem("pseudo", membership.GetIDs(initialMembership), logger)
genesisCheckpoint, err := trantor.GenesisCheckpoint([]byte{}, smrParams, logger)
genesisCheckpoint, err := trantor.GenesisCheckpoint([]byte{}, smrParams)
if err != nil {
return fmt.Errorf("could not create genesis checkpoint: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/mircat/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func debuggerNode(id t.NodeID, membership map[t.NodeID]t.NodeAddress) (*mir.Node
// Instantiate an ISS protocol module with the default configuration.
// TODO: The initial app state must be involved here. Otherwise checkpoint hashes might not match.
issConfig := issconfig.DefaultParams(membership)
stateSnapshotpb, err := iss.InitialStateSnapshot([]byte{}, issConfig, logger)
stateSnapshotpb, err := iss.InitialStateSnapshot([]byte{}, issConfig)
if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion pkg/iss/iss.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ func New(
func InitialStateSnapshot(
appState []byte,
params *issconfig.ModuleParams,
logger logging.Logger,
) (*commonpb.StateSnapshot, error) {

// Create the first membership and all ConfigOffset following ones (by using the initial one).
Expand Down
2 changes: 1 addition & 1 deletion pkg/systems/trantor/smr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func newDeployment(conf *TestConfig) (*deploytest.Deployment, error) {
if err != nil {
return nil, fmt.Errorf("error initializing Mir transport: %w", err)
}
stateSnapshotpb, err := iss.InitialStateSnapshot(initialSnapshot, issConfig, nodeLogger)
stateSnapshotpb, err := iss.InitialStateSnapshot(initialSnapshot, issConfig)
if err != nil {
return nil, fmt.Errorf("error initializing Mir state snapshot: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/systems/trantor/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ func New(
// It is a special checkpoint for epoch 0, corresponding to the state of the application
// (the serialization of which is passed as the initialAppState parameter) before applying any transactions.
// The associated certificate is empty (and should still be considered valid, as a special case).
func GenesisCheckpoint(initialAppState []byte, params Params, logger logging.Logger) (*checkpoint.StableCheckpoint, error) {
stateSnapshotpb, err := iss.InitialStateSnapshot(initialAppState, params.Iss, logger)
func GenesisCheckpoint(initialAppState []byte, params Params) (*checkpoint.StableCheckpoint, error) {
stateSnapshotpb, err := iss.InitialStateSnapshot(initialAppState, params.Iss)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion samples/chat-demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func run() error {
if err != nil {
return errors.Wrap(err, "could not create initial snapshot")
}
genesis, err = trantor.GenesisCheckpoint(initialSnapshot, trantorParams, logger)
genesis, err = trantor.GenesisCheckpoint(initialSnapshot, trantorParams)
if err != nil {
return errors.Wrap(err, "could not create genesis checkpoint")
}
Expand Down

0 comments on commit 9859950

Please sign in to comment.