Repository navigation
proxy-io: Generalize ConnectStream / ServeStream for use in tests - #365
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
fb9b742 to
cb92520
Compare
|
Updated fb9b742 -> cb92520 ( Rebased cb92520 -> 326ccfc ( |
|
LGTM. ACK cb92520. By the way, the llvm job failed with IWYU. |
Add an accessor and a Connections type alias for the EventLoop's list of incoming connections, so future code can be simplified to locate a specific connection without directly accessing the private list or embedding a Connection object itself. This change was written with Claude Sonnet 5.
Add a _Serve/ServeStream overload accepting the init object as a shared_ptr, so callers can transfer ownership instead of always passing a reference to an object they keep alive themselves. Existing reference-taking callers keep working through a thin overload that wraps the reference in a shared_ptr with an empty deleter. Also return the constructed ProxyServer along with an iterator to its Connection in loop.m_incoming_connections, so callers can look up or erase the connection later without embedding a Connection object themselves. This change was written with Claude Sonnet 5.
…Stream Give ServeStream and ConnectStream a destroy_connection parameter, defaulting to true, so callers can opt out of automatic connection teardown and manage the Connection's lifetime themselves instead. ServeStream gates the internal disconnect handler's list erase on the parameter; ConnectStream just forwards it to the existing ProxyClientBase parameter of the same name. This lets callers that need to keep a connection alive past a disconnect notification (e.g. to let in-flight server calls finish) use these helpers instead of constructing a Connection manually. This change was written with Claude Sonnet 5.
Replace TestSetup's manual Connection construction with ServeStream/ConnectStream, following the same pattern already used in Bitcoin Core's own IPC test and fuzz code. This drops server_on_disconnect entirely: ServeStream's destroy_connection parameter now controls whether a remote disconnect erases the server Connection, so the only test that needed to suppress that (the mp#348 getResults race test) just constructs TestSetup with server_owns_connection=false instead of overriding a callback afterward. This change was written with Claude Sonnet 5.
cb92520 to
326ccfc
Compare
There was a problem hiding this comment.
Note: I am planning to merge this with 0 current ACKs and ask for more review in the subtree update bitcoin/bitcoin#36747. I want to make sure this is included in the next subtree update because it's a simple API improvement that simplifies dependencies between bitcoin and libmultiprocess PRs #336 and bitcoin/bitcoin#35932 which both include this change.
The only change here since xyzconstant's previous ACK on cb92520 (#365 (comment)) is a rebase fixing an IWYU error by adding a pragma (range-diff).
acded1aafae Merge bitcoin-core/libmultiprocess#365: proxy-io: Generalize ConnectStream / ServeStream for use in tests 98f609ac50f Merge bitcoin-core/libmultiprocess#389: refactor: Enable modernize-use-scoped-lock ee06487d861 refactor: Enable modernize-use-scoped-lock 263139f41dd Merge bitcoin-core/libmultiprocess#387: ci: use newer `actions/*` versions 388e37c5bc7 Merge bitcoin-core/libmultiprocess#386: gen: make `AccessorType` static 81e55578047 Merge bitcoin-core/libmultiprocess#383: ci: Compile capnproto with GCC in gnu32 job c8ca0c0f6f1 ci: add -Wmissing-declarations to default.bash 3edd64840d0 Merge bitcoin-core/libmultiprocess#379: type: Accept any comparator, hash, and allocator in container fields 641c78ecacb ci: add -Wmissing-prototypes to LLVM config 52a028c8b78 gen: make AccessorType static 796dd742414 Merge bitcoin-core/libmultiprocess#380: .clang-tidy: Enable additional checks b1816a8d02a Merge bitcoin-core/libmultiprocess#362: Enable `-Wunused` cf2164ba0e2 ci: make curl fail more loudly 0bce5ed7a41 ci: use newer actions/ versions ee8e64b87bc ci: add -Wunused to CI configs fd75dc66964 refactor: use requires clauses instead of SFINAE enable parameters 0e6fffa8117 refactor: remove unused code fabc4901269 .clang-tidy: Enable additional modernize checks 89bccd849ee Merge bitcoin-core/libmultiprocess#381: ci: Fix OpenBSD job 04a0465d67a ci: Compile capnproto with GCC in gnu32 job 1b742cfbbd7 ci: Fix OpenBSD job a4fa10754c7 .clang-tidy: Enable additional checks not in upstream Bitcoin Core 7460e35896b .clang-tidy: Enable checks from upstream Bitcoin Core 9a42d0065d9 type: Accept any comparator, hash, and allocator in container fields 2e7812a5a1e Merge bitcoin-core/libmultiprocess#370: Fix Bitcoin Core build errors from libmultiprocess headers 686bccf766f Merge bitcoin-core/libmultiprocess#371: cmake: Fix silent include-what-you-use failures f0a14754ef4 cmake: Show include-what-you-use diagnostics when it fails 92127a984a4 cmake: Pass -w to include-what-you-use 3577d23f616 ci: Enable -Wundef in default and llvm jobs debd42955ea proxy-types: Avoid -Wundef error when KJ_NO_EXCEPTIONS is not defined 326ccfc2f87 test: simplify TestSetup using ServeStream/ConnectStream 6fd2a9c90e1 Merge bitcoin-core/libmultiprocess#367: mpgen: Change Cap'n Proto link order to fix undefined references in static builds a8c64c7faa5 ci: Enable -Wunused-const-variable in GCC jobs e46876545b4 proxy-io: add destroy_connection parameter to ServeStream and ConnectStream 701449c1657 util: Make SocketError inline constexpr 01808baa188 proxy-io: let ServeStream take ownership of init object 034e0d21b51 proxy-io: add EventLoop::incomingConnections() f1042b1a60e Merge bitcoin-core/libmultiprocess#366: ci: Compile with minimum supported g++-10 in olddeps a6ecdc113ff Merge bitcoin-core/libmultiprocess#364: util: Error out at compile time if KJ_NO_EXCEPTIONS is set 56cfdaa884e Change CapnProto library linkage for mpgen fa5633467af ci: Compile with minimum supported g++-10 in olddeps 4a1f400f8b7 util: Error out at compile time if KJ_NO_EXCEPTIONS is set 2dba130478a Merge bitcoin-core/libmultiprocess#363: ci: use LLVM 23 in Bitcoin Core CI 161197a5c7b Merge bitcoin-core/libmultiprocess#352: ci: add cmake debug output fb4ac7eb8c8 ci: use LLVM 23 in Bitcoin Core CI 7bac69de1fc Merge bitcoin-core/libmultiprocess#360: pull latest .clang-tidy from downstream 79ddc44eb32 Merge bitcoin-core/libmultiprocess#359: ci: bump cmake version to 4.3.4 in newdeps job bf229bf82ae Merge bitcoin-core/libmultiprocess#351: ci: do not ignore NIXPKGS_CHANNEL in local ci runs 073ac4f1972 Merge bitcoin-core/libmultiprocess#347: refactor: Replace EventLoop::post() with sync() taking kj::FunctionParam fa1db7a9e3e pull latest .clang-tidy from downstream 5c49666a1d8 refactor: rename EventLoop::m_post_fn to m_sync_fn 2330fbe81e2 refactor: replace EventLoop::post() with sync() taking kj::FunctionParam 4d454a8 Merge bitcoin-core/libmultiprocess#358: refactor: Enable readability-container-contains dba9958 Merge bitcoin-core/libmultiprocess#357: doc: Update Cap'n Proto version to match minimum 0092392 Merge bitcoin-core/libmultiprocess#356: ci: Remove hard-coded -j4 from sanitize config 766867fb326 ci: clarify CAPNP_CHECKOUT=master is the v1.x release branch cc3675280bf ci: bump cmake version to 4.3.4 in newdeps job fa10111 refactor: Enable readability-container-contains 81f824b doc: Update Cap'n Proto version to match minimum fa30e20 ci: Remove hard-coded -j4 from sanitize config a7ff9d5da22 ci: add cmake debug output f2e8df8 Merge bitcoin-core/libmultiprocess#350: cmake: add type-unordered-set.h and version.h to public headers 0e146c0 Merge bitcoin-core/libmultiprocess#349: type-context: fix async disconnect race condition found by antithesis 49f95e2 Merge bitcoin-core/libmultiprocess#212: ci: add newdeps job testing newer versions of cmake and capnproto 7c73cceda9b ci: rename CI-internal variables to use CI_ prefix fe1b8339f00 ci: do not ignore NIXPKGS_CHANNEL in local ci runs 914dc83 proxy: fix data race between server request threads and disconnect handling 275c8ee Merge bitcoin-core/libmultiprocess#345: Remove trailing whitespace and Add -Wtrailing-whitespace to default ci config cd7162f Merge bitcoin-core/libmultiprocess#304: proxy: fix BuildList to use non-const iteration for interface types 9b13678 ci: Add -Wtrailing-whitespace to default config 2f4be9e refactor: Remove trailing whitespace 2448d28 cmake: add type-unordered-set.h and version.h to public headers b3fc922 ci: add newdeps job testing newest versions of cmake and capnproto 390b5f9 Merge bitcoin-core/libmultiprocess#344: test: listen_tests and connect_tests follow-ups d6f8588 proxy: fix BuildList to use non-const iteration for interface types e18ca52 Merge bitcoin-core/libmultiprocess#343: test: fix race in connect_tests disconnect-deferred-failure test c39c785 doc: note construct() call in valid init interface test b9c36c6 test: close sockets unconditionally and check errors with KJ_SYSCALL 7eb741e test: drop unnecessary KJ_EXPECT(true) 113f1d4 test: join server thread unconditionally in connect tests 44bc463 test: drop mp:: prefixes in connect tests 038d33e test: share DefaultLogHandler between test files b54a163 test: drop TestSetup socket members in connect tests 70467c5 test: add m_ prefix to TestSetup members in connect tests cc260f2 test: replace capnp fix link with upstream PR 137a6e4 test: fix race in connect_tests disconnect-deferred-failure test 8dab0d4 Merge bitcoin-core/libmultiprocess#341: ci: add -Wextra-semi to llvm config b3b134e ci: add -Wextra-semi to llvm config bdd0cd6 Merge bitcoin-core/libmultiprocess#339: refactor: add `[[noreturn]]` attributes a779a09 ci: add -Wmissing-noreturn 636aaff refactor: add missing [[noreturn]] attributes cc11c2b Merge bitcoin-core/libmultiprocess#338: test: check ReadList return value 2d6e863 Merge bitcoin-core/libmultiprocess#334: ci: Set CMAKE_BUILD_PARALLEL_LEVEL to enable parallelism by default d4d10ff Merge bitcoin-core/libmultiprocess#332: ci: add -Wextra-semi to default config b540e70 Merge bitcoin-core/libmultiprocess#324: proxy: Name threads spawned by the event loop e5e367e Merge bitcoin-core/libmultiprocess#312: util: report back child errors to parent and throw 2220df6 Merge bitcoin-core/libmultiprocess#298: Fix error handling when creating clients (`mp::ConnectStream`) 51defb7 Merge bitcoin-core/libmultiprocess#340: ci: Update `capnproto` prerequisites on NetBSD 7e94790 ci: Update `capnproto` prerequisites on NetBSD 9f25ffc test: Cover OS thread names for worker, pool, and async threads 648a185 proxy: Name threads spawned by the event loop 49834b2 ci: add -Wextra-semi to default config fae9a63 example: Remove unused kj/async.h include bb47369 Fix error handling when creating clients 44d1914 Add test coverage for ConnectStream 231361a Correct stale UnixListener doc comment 060c1a5 Extract `UnixListener` class to a dedicated file 62f25af test: check ReadList return value ce51d73 ci: Set CMAKE_BUILD_PARALLEL_LEVEL to enable parallism in build jobs by default 67302cd Merge bitcoin-core/libmultiprocess#331: Remove code for Cap'n Proto versions before 0.9 f13c64a Merge bitcoin-core/libmultiprocess#330: ci: Compile with minimum supported g++ in olddeps 8e026f6 Merge bitcoin-core/libmultiprocess#327: build: avoid unnecessary capnp-rpc dependency for mpgen e5206e9 Merge bitcoin-core/libmultiprocess#325: cmake: Remove `QUIET` option from `find_package(CapnProto ...)` 879efea Merge bitcoin-core/libmultiprocess#321: ci: Roll NetBSD releases to 11.0, drop 9.4 abf127a Merge bitcoin-core/libmultiprocess#317: ipc: Fix mpgen capnp tool path for vcpkg/Windows builds c437d7f Merge bitcoin-core/libmultiprocess#310: test: cover immediate client disconnects for `ListenConnections` 31bff8a Merge bitcoin-core/libmultiprocess#307: refactor: memcpy -> std::ranges::copy f355108 Merge bitcoin-core/libmultiprocess#303: type-chrono: Add CustomBuildField/CustomReadField overloads for std::chrono::time_point 2d67817 Merge bitcoin-core/libmultiprocess#296: ci: Bump channel to nixos-26.05 3f05b11 util: kill and reap child on SpawnProcess error 4a56c18 util: report back child error to parent and throw a9e70db ci: Add NetBSD release 11.0 2d33b14 ci: Switch to default compiler on NetBSD 9.4 36f7400 ci: Drop NetBSD release 9.4 bd50831 refactor: Drop stray semicolons after function definitions 788f17a Remove code for Cap'n Proto versions before 0.9 7402aff ci: Pin oldeps config to older nixpkgs channel to compile older cmake with older gcc edf6343 ci: Compile with minimum supported g++-11 in olddeps fa47449 cmake: avoid unnecessary capnp-rpc dependency for mpgen a494b76 cmake: Remove `QUIET` option from `find_package(CapnProto ...)` 26452e0 refactor: memcpy -> std::ranges::copy e1dcc6e Merge bitcoin-core/libmultiprocess#316: cmake: Fix stale codegen when mpgen binary changes 7a72df0 type-chrono: Add CustomBuildField/CustomReadField overloads for std::chrono::time_point 45b685c type-number, type-chrono: Fix static assert signed/unsigned comparisons 45f6255 type-number: exclude bool from the integral overload 8d6d464 Merge bitcoin-core/libmultiprocess#315: Fix startup race in example a6fc80d Merge bitcoin-core/libmultiprocess#311: bugfix: clear FD_CLOEXEC in child instead of parent before fork 496fb84 test: cover immediate client disconnects for `ListenConnections` 36c6c63 doc: Document reference-counted EventLoop lifetime 3a997e1 Fix startup race in mpexample f5c15ce Merge bitcoin-core/libmultiprocess#323: refactor: access ThreadContext through CurrentThread(), ci: switch Bitcoin Core to master 66298c7 ci: Switch back to Bitcoin Core's master branch 86b4810 refactor: access ThreadContext through CurrentThread() eea9c64 cmake: Fix stale codegen when mpgen binary changes a26a084 cmake: Fix mpgen capnp tool path for vcpkg/Windows builds 140d9ba test: allow custom log handler in `ListenSetup` 1e0c7ff util: Clear FD_CLOEXEC in child instead of parent before fork 8550ee6 util, refactor: Add ChildFail helper for post-fork child errors 17eab90 test: Fix typo in listen_tests.cpp ce865a9 refactor: Directly use value in CustomBuildField 3f221b5 Merge bitcoin-core/libmultiprocess#274: Add nonunix platform support 1b0f605 doc: Remove trailing whitespace d8f8ca3 ipc: Wrap mpgen main() in try-catch to print errors fbe5a14 ci: Check out bitcoin/bitcoin PR #35084 instead of master 39d3690 types: Replace SFINAE with requires clauses to avoid MSVC C2039 error ba68520 proxy, refactor: Fix C4305 truncation warning in Accessor on MSVC 1d81d47 util, refactor: Fix PtrOrValue constructor for move-only types on MSVC b883fe1 proxy: Fix shutdownWrite() exception handling on macOS with dynamic libraries 0012411 proxy: Call shutdownWrite() in Connection destructor 38312ad proxy, refactor: Change ConnectStream and ServeStream to accept stream objects e96d5d7 proxy, refactor: Replace EventLoop wakeup fd integers with KJ stream objects db4f9a3 cmake: Bump minimum required Cap'n Proto version to 0.9 652934f util, refactor: Add SocketPair() and use it in SpawnProcess 1c6ef7a util, refactor: Do not fork() and exec() separately 1389cf3 util, refactor: Add SpawnConnectInfo type alias and use it c7ca1f0 util, refactor: Add SocketId type alias and use it be46a35 util, refactor: Add ProcessId type alias and use it 91a78db doc: Bump version 13 > 14 fa2c56e ci: Bump channel to nixos-26.05 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: acded1aafae12ce57d3d5a6ce3beb6870805f469
…support and fix race conditions d5f7524 doc: Bump minimum required Cap'n Proto version to 0.9.2 (Ryan Ofsky) 4898199 build: suppress -Wc++23-lambda-attributes in warn_interface (Ryan Ofsky) 270f5db Squashed 'src/ipc/libmultiprocess/' changes from e8de5c7..acded1aafae (Ryan Ofsky) Pull request description: The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh). Changes since last subtree update (#35720): - Adds support for nonunix platforms, making API changes that are not backwards compatible ([#274](bitcoin-core/libmultiprocess#274)). Follow-ups add a `CurrentThread()` accessor matching compatibility code in [#35084](#35084) ([#323](bitcoin-core/libmultiprocess#323)) and remove code for Cap'n Proto versions before 0.9 ([#331](bitcoin-core/libmultiprocess#331)). - Fixes a data race between IPC calls running on worker threads and disconnects, found by Antithesis ([#349](bitcoin-core/libmultiprocess#349)). - Fixes a use-after-free when a socket disconnects before `ConnectStream` connects, and leaks and hangs when a client `construct()` call throws ([#298](bitcoin-core/libmultiprocess#298)). - Fixes a race where file descriptors from `SpawnProcess` could leak into processes forked at the same time by other threads, by clearing `FD_CLOEXEC` in the child after forking ([#311](bitcoin-core/libmultiprocess#311)). - Makes `SpawnProcess` report `exec` failures back to the parent and throw, reaping the child ([#312](bitcoin-core/libmultiprocess#312)). - Adds support for `std::chrono::time_point` fields ([#303](bitcoin-core/libmultiprocess#303)) and for serializing lists of interface objects that need to be moved from ([#304](bitcoin-core/libmultiprocess#304)), both needed by [#10102](#10102). - Accepts container fields and parameters with any comparator, hash, and allocator types, like Bitcoin Core's `GCSFilter::ElementSet`, needed by [#29409](#29409) ([#379](bitcoin-core/libmultiprocess#379)). - Finds the `capnp` tool in vcpkg and Windows builds, needed by [#32387](#32387) ([#317](bitcoin-core/libmultiprocess#317)). - Adds a `destroy_connection` option to `ServeStream` and `ConnectStream`, lets `ServeStream` take ownership of the init object and return the new server and its connection, and adds an `EventLoop::incomingConnections()` accessor, simplifying test setup in both repositories and needed by [#35932](#35932) ([#365](bitcoin-core/libmultiprocess#365)). - Replaces `EventLoop::post()` with `sync()` taking a `kj::FunctionParam`, avoiding a heap allocation per call ([#347](bitcoin-core/libmultiprocess#347)). - Names threads spawned by the event loop so they can be told apart in tools and logs ([#324](bitcoin-core/libmultiprocess#324)). - Fixes warnings that Bitcoin Core enables or plans to enable: adds `[[noreturn]]` attributes for `-Wmissing-noreturn` ([#339](bitcoin-core/libmultiprocess#339), for [#35911](#35911)), and fixes `-Wunused` ([#362](bitcoin-core/libmultiprocess#362), for [#36167](#36167)), `-Wunused-const-variable` and `-Wundef` ([#370](bitcoin-core/libmultiprocess#370)), and `-Wmissing-prototypes` ([#386](bitcoin-core/libmultiprocess#386), for [#36743](#36743)) warnings. - Fails at compile time with a suggested workaround when Cap'n Proto misdetects exception support (`KJ_NO_EXCEPTIONS`), as happens on NetBSD ([#364](bitcoin-core/libmultiprocess#364)). - Build improvements: fixes stale generated code when the `mpgen` binary changes ([#316](bitcoin-core/libmultiprocess#316)), fixes `mpgen` link order for static Cap'n Proto builds ([#367](bitcoin-core/libmultiprocess#367)), links `mpgen` against `kj-async` instead of `capnp-rpc` ([#327](bitcoin-core/libmultiprocess#327)), shows Cap'n Proto `find_package` diagnostics ([#325](bitcoin-core/libmultiprocess#325)), installs `type-unordered-set.h` and `version.h` ([#350](bitcoin-core/libmultiprocess#350)), and shows include-what-you-use errors instead of failing silently ([#371](bitcoin-core/libmultiprocess#371)). - Test, CI, documentation, and minor code improvements: fix for a startup race in the example program ([#315](bitcoin-core/libmultiprocess#315)), new test for immediate client disconnects in `ListenConnections` ([#310](bitcoin-core/libmultiprocess#310)), `ReadList` return value check ([#338](bitcoin-core/libmultiprocess#338)), connect test race fix ([#343](bitcoin-core/libmultiprocess#343)) and cleanups ([#344](bitcoin-core/libmultiprocess#344)), `std::ranges::copy` follow-ups ([#307](bitcoin-core/libmultiprocess#307)), trailing whitespace removal ([#345](bitcoin-core/libmultiprocess#345)), Cap'n Proto version documentation fix ([#357](bitcoin-core/libmultiprocess#357)), clang-tidy updates ([#358](bitcoin-core/libmultiprocess#358), [#360](bitcoin-core/libmultiprocess#360), [#380](bitcoin-core/libmultiprocess#380), [#389](bitcoin-core/libmultiprocess#389)), new CI job testing newer cmake and Cap'n Proto versions ([#212](bitcoin-core/libmultiprocess#212), [#359](bitcoin-core/libmultiprocess#359)), CI coverage for the minimum supported g++ ([#330](bitcoin-core/libmultiprocess#330), [#366](bitcoin-core/libmultiprocess#366)), new CI warnings ([#332](bitcoin-core/libmultiprocess#332), [#341](bitcoin-core/libmultiprocess#341)), CI parallelism ([#334](bitcoin-core/libmultiprocess#334), [#356](bitcoin-core/libmultiprocess#356)), CI diagnostics ([#351](bitcoin-core/libmultiprocess#351), [#352](bitcoin-core/libmultiprocess#352)), Nix and LLVM updates ([#296](bitcoin-core/libmultiprocess#296), [#363](bitcoin-core/libmultiprocess#363)), NetBSD and OpenBSD CI fixes ([#321](bitcoin-core/libmultiprocess#321), [#340](bitcoin-core/libmultiprocess#340), [#381](bitcoin-core/libmultiprocess#381)), building Cap'n Proto with GCC in the 32-bit CI job to avoid an ABI mismatch ([#383](bitcoin-core/libmultiprocess#383)), and GitHub Actions updates ([#387](bitcoin-core/libmultiprocess#387)). The second commit suppresses the clang `-Wc++23-lambda-attributes` warning, which the new `[[noreturn]]` lambda attribute in `mp/proxy-types.h` triggers in C++20 builds. Since #31507 the Windows build uses clang-cl, so the same flag covers it. The third commit updates the minimum Cap'n Proto version in `doc/dependencies.md` to 0.9.2 (1.0 with Clang). This update raises libmultiprocess's own minimum from 0.7 to 0.9 (bitcoin-core/libmultiprocess#331), and libmultiprocess rejects 0.9.0 and 0.9.1 for CVE-2022-46149 and, with Clang 16 or newer, every version before 1.0. ACKs for top commit: fanquake: ACK d5f7524 willcl-ark: ACK d5f7524 Tree-SHA512: 4064944f4d8bb6c1665ddc7d5fae838492235d7dfdafab88b19b687ff6892460a3f450b90a145b287866330c569b862d748c941a70c65abc7f273ef13e490fd7
acded1aafa Merge bitcoin-core/libmultiprocess#365: proxy-io: Generalize ConnectStream / ServeStream for use in tests 98f609ac50 Merge bitcoin-core/libmultiprocess#389: refactor: Enable modernize-use-scoped-lock ee06487d86 refactor: Enable modernize-use-scoped-lock 263139f41d Merge bitcoin-core/libmultiprocess#387: ci: use newer `actions/*` versions 388e37c5bc Merge bitcoin-core/libmultiprocess#386: gen: make `AccessorType` static 81e5557804 Merge bitcoin-core/libmultiprocess#383: ci: Compile capnproto with GCC in gnu32 job c8ca0c0f6f ci: add -Wmissing-declarations to default.bash 3edd64840d Merge bitcoin-core/libmultiprocess#379: type: Accept any comparator, hash, and allocator in container fields 641c78ecac ci: add -Wmissing-prototypes to LLVM config 52a028c8b7 gen: make AccessorType static 796dd74241 Merge bitcoin-core/libmultiprocess#380: .clang-tidy: Enable additional checks b1816a8d02 Merge bitcoin-core/libmultiprocess#362: Enable `-Wunused` cf2164ba0e ci: make curl fail more loudly 0bce5ed7a4 ci: use newer actions/ versions ee8e64b87b ci: add -Wunused to CI configs fd75dc6696 refactor: use requires clauses instead of SFINAE enable parameters 0e6fffa811 refactor: remove unused code fabc490126 .clang-tidy: Enable additional modernize checks 89bccd849e Merge bitcoin-core/libmultiprocess#381: ci: Fix OpenBSD job 04a0465d67 ci: Compile capnproto with GCC in gnu32 job 1b742cfbbd ci: Fix OpenBSD job a4fa10754c .clang-tidy: Enable additional checks not in upstream Bitcoin Core 7460e35896 .clang-tidy: Enable checks from upstream Bitcoin Core 9a42d0065d type: Accept any comparator, hash, and allocator in container fields 326ccfc2f8 test: simplify TestSetup using ServeStream/ConnectStream e46876545b proxy-io: add destroy_connection parameter to ServeStream and ConnectStream 01808baa18 proxy-io: let ServeStream take ownership of init object 034e0d21b5 proxy-io: add EventLoop::incomingConnections() git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: acded1aafae12ce57d3d5a6ce3beb6870805f469
Generalize
ConnectStreamandServeStreamfunctions to simplify test setup in libmultiprocess and bitcoin core code (in followup ryanofsky/bitcoin@990f259). Also add anincomingConnectionsaccessor so Bitcoin Core code does not need to directly access the incoming connections list to disconnect clients.These changes help with #336 by getting rid of external code that would need to change with its changes to the
Connectionrepresentation.