Fix some bugs when integrating cached reset branch #2093
reviewdog [golangci] report
reported by reviewdog 🐶
Findings (5)
pkg/protocol/chain_manager.go|267 col 16| superfluous-else: if block ends with call to panic function, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
pkg/protocol/commitment_verifier.go|40 col 55| unnecessary conversion (unconvert)
pkg/protocol/protocol_warp_sync.go|102 col 51| unnecessary conversion (unconvert)
pkg/protocol/protocol_warp_sync.go|113 col 59| unnecessary conversion (unconvert)
pkg/protocol/chain.go|229 col 17| func (*Chain).earliestUncommittedSlot
is unused (unused)
Filtered Findings (0)
Annotations
Check failure on line 267 in pkg/protocol/chain_manager.go
github-actions / golangci
[golangci] pkg/protocol/chain_manager.go#L267
superfluous-else: if block ends with call to panic function, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
Raw output
pkg/protocol/chain_manager.go:267:16: superfluous-else: if block ends with call to panic function, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
} else {
publishCommitment(commitmentToPublish)
}
Check failure on line 40 in pkg/protocol/commitment_verifier.go
github-actions / golangci
[golangci] pkg/protocol/commitment_verifier.go#L40
unnecessary conversion (unconvert)
Raw output
pkg/protocol/commitment_verifier.go:40:55: unnecessary conversion (unconvert)
if !iotago.VerifyProof(merkleProof, iotago.Identifier(tree.Root()), commitment.RootsID()) {
^
Check failure on line 102 in pkg/protocol/protocol_warp_sync.go
github-actions / golangci
[golangci] pkg/protocol/protocol_warp_sync.go#L102
unnecessary conversion (unconvert)
Raw output
pkg/protocol/protocol_warp_sync.go:102:51: unnecessary conversion (unconvert)
if !iotago.VerifyProof(proof, iotago.Identifier(acceptedBlocks.Root()), commitment.RootsID()) {
^
Check failure on line 113 in pkg/protocol/protocol_warp_sync.go
github-actions / golangci
[golangci] pkg/protocol/protocol_warp_sync.go#L113
unnecessary conversion (unconvert)
Raw output
pkg/protocol/protocol_warp_sync.go:113:59: unnecessary conversion (unconvert)
if !iotago.VerifyProof(mutationProof, iotago.Identifier(acceptedTransactionIDs.Root()), commitment.RootsID()) {
^
Check failure on line 229 in pkg/protocol/chain.go
github-actions / golangci
[golangci] pkg/protocol/chain.go#L229
func `(*Chain).earliestUncommittedSlot` is unused (unused)
Raw output
pkg/protocol/chain.go:229:17: func `(*Chain).earliestUncommittedSlot` is unused (unused)
func (c *Chain) earliestUncommittedSlot() iotago.SlotIndex {
^