Five peer doubles existed across seven suites. Two of them, reduce_relay_test's
PeerPartial and LedgerReplay_test's TestPeer, independently stubbed the same 22 of
Peer's 24 pure virtuals in two different directories, so every method added to Peer
broke both files identically. The other three wrapped PeerImp to capture what it would
have sent: src/test/overlay/PeerTest, a same-named copy nested in tx_reduce_relay_test,
and TMGetObjectByHash_test's own overlay wiring.
Both duplications collapse into two headers. CapturePeer, in src/test/overlay, is a real
PeerImp that captures the messages it would have sent, built by CapturePeerBuilder.
PeerStub, in src/test/jtx, is a null Peer whose methods all return defaults; PeerPartial
and TestPeer derive from it and override only what they exercise.
CapturePeer replaces PeerTest rather than the reverse on four counts: it hands out a
distinct remote address per peer, so the peer finder's per-address limit is never
reached; it holds the connection id counter per builder instead of in a static that
every suite has to reset; it takes the handshake request as a parameter, so a suite
negotiates a feature instead of overriding the negotiated result; and it declares its
two sinks by value, which is what lets a suite write `using CapturePeer::CapturePeer;`
and reach a protected PeerImp member. It also asks for the newest supported protocol
version instead of the unsupported 1.7 that makePeerTest wrote down, which had silently
turned off every feature PeerImp gates on the version, so TMGetLedger_test now reaches
the LedgerNodeDepth reply shape rather than only the legacy one. That version cannot be
derived from outside ProtocolVersion.cpp, whose list is file-local, so this adds a
newestSupportedProtocolVersion() accessor beside the existing
supportedProtocolVersions() and isProtocolSupported(). PeerStub goes in src/test/jtx
because both the overlay and the app suites need it, and test.jtx already sits below
every suite; levelization records the resulting "test.jtx > xrpld.overlay" edge, and
there is no cycle.
* upstream/release/3.3.x: (41 commits)
chore: Bump version to 3.3.0
chore: Bump version to 3.3.0-rc7
fix: Increase manifest protocol message size cap and fix manifests relay
fix: Cap untrusted manifests per message and drop oversized ones
chore: Bump version to 3.2.1
chore: Bump version to 3.2.1-rc1
fix: Cap untrusted manifests per message and drop oversized ones
fix: Reject oversized validator manifest before decoding
fix: Reduce untrusted manifest cache cap to 100
fix: Bound untrusted manifest cache
chore: Bump version to 3.3.0-rc6
feat: Package validator-keys inside rippled
chore: Bump version to 3.3.0-rc5
fix: Switch SponsorshipSet to use a delta for sfFeeAmount
fix: Re-revert "fix: Set request size limits and differential pricing for get-object-by-hash calls"
chore: Bump version to 3.3.0-rc4
fix: Revert "fix: Set request size limits and differential pricing for get-object-by-hash calls"
chore: Bump version to 3.3.0-rc3
fix: Reduce untrusted manifest cache cap to 100
fix: Revert "fix: Reject oversized SHAMap nodes in gotStaleData and fetch-pack path"
...