diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 4abc6e0203..339609cf4e 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -950,12 +950,11 @@ func makeDatabaseHandles() int { if err != nil { Fatalf("Failed to retrieve file descriptor allowance: %v", err) } - if u64limit, err := fdlimit.Raise(uint64(limit)); err != nil { + raised, err := fdlimit.Raise(uint64(limit)) + if err != nil { Fatalf("Failed to raise file descriptor allowance: %v", err) - return 0 // Make the compiler happy - } else { - return int(u64limit / 2) // Leave half for networking and other stuff } + return int(raised / 2) // Leave half for networking and other stuff } // MakeAddress converts an account specified directly as a hex encoded string or