mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
fix: resolve staticcheck lint issues
This commit is contained in:
@@ -577,10 +577,8 @@ func SyncStateFromVM(ctx context.Context, vm BlockBuilder, consensus *Transitive
|
||||
}
|
||||
}
|
||||
|
||||
// Set preference
|
||||
if err := vm.SetPreference(ctx, lastAcceptedID); err != nil {
|
||||
// Non-fatal
|
||||
}
|
||||
// Set preference (non-fatal if this fails)
|
||||
_ = vm.SetPreference(ctx, lastAcceptedID)
|
||||
|
||||
// Sync consensus
|
||||
if consensus != nil {
|
||||
|
||||
@@ -730,7 +730,7 @@ func isIPv6Literal(s string) bool {
|
||||
c := s[i]
|
||||
if c == ':' {
|
||||
hasColon = true
|
||||
} else if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) {
|
||||
} else if (c < '0' || c > '9') && (c < 'a' || c > 'f') && (c < 'A' || c > 'F') {
|
||||
// Contains non-hex, non-colon - probably a hostname
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user