mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-21 15:44:59 +02:00
4afbabdcef
When setting the fd limit to unlimited, the node fails to start: ulimit -n unlimited build/bin/bitcoind Error: Not enough file descriptors available. -1 available, 160 required. This was caused by RaiseFileDescriptorLimit() casting limitFD.rlim_cur to int, which for RLIM_INFINITY overflows to -1. Fix it by returning std::numeric_limits<int>::max() instead. This commit also adds a functional test, which is skipped on environments with a hard limit below infinity. Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org> Co-authored-by: winterrdog