bitcoin/src/util
glozow 7e1007a3c6
Merge bitcoin/bitcoin#25421: net: convert standalone IsSelectableSocket() and SetSocketNonBlocking() to Sock methods
b527b54950 net: convert standalone SetSocketNonBlocking() to Sock::SetNonBlocking() (Vasil Dimov)
29f66f7682 moveonly: move SetSocketNonBlocking() from netbase to util/sock (Vasil Dimov)
b4bac55679 net: convert standalone IsSelectableSocket() to Sock::IsSelectable() (Vasil Dimov)
5db7d2ca0a moveonly: move IsSelectableSocket() from compat.h to sock.{h,cpp} (Vasil Dimov)

Pull request description:

  _This is a piece of #21878, chopped off to ease review._

  * convert standalone `IsSelectableSocket()` to `Sock::IsSelectable()`
  * convert standalone `SetSocketNonBlocking()` to `Sock::SetNonBlocking()`

  This further encapsulates syscalls inside the `Sock` class and makes the callers mockable.

ACKs for top commit:
  jonatack:
    ACK b527b54950 review/debug build/unit tests at each commit, cross-referenced the changes with `man select` and `man errno`, ran a signet node on the last commit with ip4/ip6//tor/i2p/cjdns and network connections were nominal
  dergoegge:
    Code review ACK b527b54950

Tree-SHA512: af783ce558c7a89e173f7ab323fb3517103d765c19b5d14de29f64706b4e1fea3653492e8ea73ae972699986aaddf2ae72c7cfaa7dad7614254283083b7d2632
2022-10-12 15:49:02 -04:00
..
asmap.cpp Merge bitcoin/bitcoin#25285: Add AutoFile without ser-type and ser-version and use it where possible 2022-07-20 09:32:11 +01:00
asmap.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
bip32.cpp Fix iwyu 2022-08-20 09:33:01 +02:00
bip32.h refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
bitdeque.h Add bitdeque, an std::deque<bool> analogue that does bit packing. 2022-08-23 11:34:10 -04:00
bytevectorhash.cpp refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
bytevectorhash.h refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
check.cpp util/check: stop using lambda for Assert/Assume 2022-03-30 23:09:13 +10:00
check.h lint: Mention NONFATAL_UNREACHABLE in lint-assertions.py 2022-04-26 10:01:54 +02:00
epochguard.h util, refactor: Add UNIQUE_NAME helper macro 2022-02-16 14:59:20 +02:00
error.cpp Validate port options 2022-10-05 19:30:15 +02:00
error.h Validate port options 2022-10-05 19:30:15 +02:00
fastrange.h Add FastRange32 function and use it throughout the codebase 2022-01-07 13:37:47 -05:00
fees.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
fees.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
getuniquepath.cpp Disallow more unsafe string->path conversions allowed by path append operators 2022-04-21 12:01:00 -05:00
getuniquepath.h Introduce GetUniquePath(base) helper method to replace boost::filesystem::unique_path() which is not available in std::filesystem. 2021-02-04 11:38:09 +01:00
golombrice.h [moveonly] Move MapIntoRange() to separate util/fastrange.h 2022-01-06 11:27:06 -05:00
hash_type.h move-only: Add util/hash_type 2021-05-11 10:38:18 +02:00
hasher.cpp refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
hasher.h refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
macros.h util, refactor: Add UNIQUE_NAME helper macro 2022-02-16 14:59:20 +02:00
message.cpp Fix iwyu 2022-08-20 09:33:01 +02:00
message.h refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
moneystr.cpp refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
moneystr.h refactor: Remove defunct attributes.h includes 2022-05-21 13:54:33 -05:00
overflow.h util: Add SaturatingAdd helper 2022-02-21 14:32:53 +01:00
overloaded.h refactor: Make CWalletTx sync state type-safe 2021-11-15 09:11:44 -05:00
rbf.cpp
rbf.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
readwritefile.cpp refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
readwritefile.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
result.h refactor: Replace BResult with util::Result 2022-08-03 07:33:01 -04:00
serfloat.cpp Add platform-independent float encoder/decoder 2021-05-24 16:04:44 -07:00
serfloat.h refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
settings.cpp settings: Add update/getPersistent/isIgnored methods 2022-05-19 11:32:56 -04:00
settings.h settings: Add update/getPersistent/isIgnored methods 2022-05-19 11:32:56 -04:00
sock.cpp net: convert standalone SetSocketNonBlocking() to Sock::SetNonBlocking() 2022-07-20 16:26:24 +02:00
sock.h net: convert standalone SetSocketNonBlocking() to Sock::SetNonBlocking() 2022-07-20 16:26:24 +02:00
spanparsing.cpp refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
spanparsing.h Extend Split to work with multiple separators 2022-05-04 07:34:47 +02:00
strencodings.cpp Validate port value in SplitHostPort 2022-10-05 19:24:04 +02:00
strencodings.h Validate port value in SplitHostPort 2022-10-05 19:24:04 +02:00
string.cpp Fix issues when calling std::move(const&) 2022-08-20 09:32:53 +02:00
string.h Merge bitcoin/bitcoin#25872: Fix issues when calling std::move(const&) 2022-08-31 08:38:24 +01:00
syscall_sandbox.cpp Remove gui-only syscalls 2022-04-05 13:30:06 +02:00
syscall_sandbox.h init: Disable syscall sandbox in the bitcoin-qt process 2022-04-05 13:29:42 +02:00
syserror.cpp refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
syserror.h util: Replace non-threadsafe strerror 2022-04-28 10:24:06 +02:00
system.cpp kernel: move RunCommandParseJSON to its own file 2022-10-04 13:51:40 +00:00
system.h kernel: move RunCommandParseJSON to its own file 2022-10-04 13:51:40 +00:00
thread.cpp refactor: use std::string for thread names 2022-09-13 19:07:39 +01:00
thread.h refactor: use std::string for thread names 2022-09-13 19:07:39 +01:00
threadnames.cpp refactor: add missing std:: includes to threadnames.cpp 2022-04-01 14:49:13 +01:00
threadnames.h
time.cpp refactor: move Boost datetime usage to wallet 2022-10-01 11:41:53 +01:00
time.h Merge bitcoin/bitcoin#26118: log: Use steady clock for bench logging 2022-10-10 12:00:34 +02:00
tokenpipe.cpp Guard #include <config/bitcoin-config.h> 2022-05-02 16:41:30 +02:00
tokenpipe.h util: Add RAII TokenPipe 2021-03-04 18:24:00 +01:00
trace.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
translation.h refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
types.h Add util/types.h with ALWAYS_FALSE template 2021-09-07 19:19:02 +02:00
ui_change_type.h wallet: Do not include server symbols 2020-06-27 11:39:09 -04:00
url.cpp refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00
url.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
vector.h refactor: add most of src/util to iwyu 2022-07-08 11:06:01 +01:00