Skip to content

Commit

Permalink
*: fix linter issues
Browse files Browse the repository at this point in the history
Some issues are found in the old files by the updated linter job.

Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Feb 9, 2024
1 parent ccdd6e3 commit 15b3f97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ func defaultConfig() *Config {
TimestampIncrement: defaultTimestampIncrement,
GetKeyPair: nil,
NewBlockFromContext: NewBlockFromContext,
RequestTx: func(h ...util.Uint256) {},
RequestTx: func(...util.Uint256) {},
StopTxFlow: func() {},
GetTx: func(h util.Uint256) block.Transaction { return nil },
GetTx: func(util.Uint256) block.Transaction { return nil },

Check warning on line 104 in config.go

View check run for this annotation

Codecov / codecov/patch

config.go#L104

Added line #L104 was not covered by tests
GetVerified: func() []block.Transaction { return make([]block.Transaction, 0) },
VerifyBlock: func(b block.Block) bool { return true },
Broadcast: func(m payload.ConsensusPayload) {},
ProcessBlock: func(b block.Block) {},
GetBlock: func(h util.Uint256) block.Block { return nil },
VerifyBlock: func(block.Block) bool { return true },
Broadcast: func(payload.ConsensusPayload) {},
ProcessBlock: func(block.Block) {},
GetBlock: func(util.Uint256) block.Block { return nil },

Check warning on line 109 in config.go

View check run for this annotation

Codecov / codecov/patch

config.go#L106-L109

Added lines #L106 - L109 were not covered by tests
WatchOnly: func() bool { return false },
CurrentHeight: nil,
CurrentBlockHash: nil,
Expand Down
4 changes: 2 additions & 2 deletions dbft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ func (s *testState) getOptions() []Option {
WithProcessBlock(func(b block.Block) { s.blocks = append(s.blocks, b) }),
WithGetConsensusAddress(s.nextConsensus),
WithWatchOnly(func() bool { return false }),
WithGetBlock(func(h util.Uint256) block.Block { return nil }),
WithGetBlock(func(util.Uint256) block.Block { return nil }),
WithTimer(timer.New()),
WithLogger(zap.NewNop()),
WithNewBlockFromContext(NewBlockFromContext),
Expand All @@ -809,7 +809,7 @@ func (s *testState) getOptions() []Option {

verify := s.verify
if verify == nil {
verify = func(b block.Block) bool { return true }
verify = func(block.Block) bool { return true }
}

opts = append(opts, WithVerifyBlock(verify))
Expand Down

0 comments on commit 15b3f97

Please sign in to comment.