Feat: Reset logic for engine to roll-back in memory. #2016
reviewdog [golangci] report
reported by reviewdog 🐶
Findings (3)
pkg/protocol/engine/ledger/blockvoterank.go|27 col 9| indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
components/restapi/core/component.go|57 col 16| string /outputs/:
has 3 occurrences, make it a constant (goconst)
pkg/protocol/engine/ledger/ledger/ledger.go|261 col 9| indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
Filtered Findings (0)
Annotations
Check failure on line 27 in pkg/protocol/engine/ledger/blockvoterank.go
github-actions / golangci
[golangci] pkg/protocol/engine/ledger/blockvoterank.go#L27
indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
Raw output
pkg/protocol/engine/ledger/blockvoterank.go:27:9: indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
} else {
return bytes.Compare(v.blockID[:], other.blockID[:])
}
Check failure on line 57 in components/restapi/core/component.go
github-actions / golangci
[golangci] components/restapi/core/component.go#L57
string `/outputs/:` has 3 occurrences, make it a constant (goconst)
Raw output
components/restapi/core/component.go:57:16: string `/outputs/:` has 3 occurrences, make it a constant (goconst)
RouteOutput = "/outputs/:" + restapipkg.ParameterOutputID
^
Check failure on line 261 in pkg/protocol/engine/ledger/ledger/ledger.go
github-actions / golangci
[golangci] pkg/protocol/engine/ledger/ledger/ledger.go#L261
indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
Raw output
pkg/protocol/engine/ledger/ledger/ledger.go:261:9: indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
} else {
return output, nil
}