fix: resolve staticcheck lint issues

This commit is contained in:
2026-02-05 18:36:28 -08:00
parent 6d2a210719
commit ef3f0541da
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -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 {
+1 -1
View File
@@ -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
}