2#include <test/jtx/envconfig.h>
4#include <xrpld/app/ledger/BuildLedger.h>
5#include <xrpld/app/ledger/LedgerMaster.h>
6#include <xrpld/app/ledger/LedgerReplay.h>
7#include <xrpld/app/ledger/LedgerReplayTask.h>
8#include <xrpld/app/ledger/LedgerReplayer.h>
9#include <xrpld/app/ledger/detail/LedgerDeltaAcquire.h>
10#include <xrpld/app/ledger/detail/LedgerReplayMsgHandler.h>
11#include <xrpld/app/ledger/detail/SkipListAcquire.h>
12#include <xrpld/overlay/PeerSet.h>
13#include <xrpld/overlay/detail/PeerImp.h>
15#include <xrpl/basics/Slice.h>
33 auto const alice =
Account(
"alice");
34 auto const bob =
Account(
"bob");
37 env.
fund(
XRP(100000), alice, bob);
42 auto const lastClosedParent =
ledgerMaster.getLedgerByHash(lastClosed->header().parentHash);
46 BEAST_EXPECT(replayed->header().hash == lastClosed->header().hash);
324 bool enableLedgerReplay)
349 if ((rand() % 100 + 1) <= dropRate)
354 case protocol::mtPROOF_PATH_REQ: {
358 dynamic_cast<protocol::TMProofPathRequest const&
>(msg));
365 case protocol::mtREPLAY_DELTA_REQ: {
369 dynamic_cast<protocol::TMReplayDeltaRequest const&
>(msg));
457 auto fundedAccounts =
accounts.size();
458 for (
int i = 0; i < newAccounts; ++i)
472 int fundedAccounts =
accounts.size();
473 assert(fundedAccounts >= newTxes);
480 auto updateIdx = [&]() {
481 assert(fundedAccounts > senders.
size());
482 fromIdx = (fromIdx + r) % fundedAccounts;
483 while (senders.
count(fromIdx) != 0)
484 fromIdx = (fromIdx + 1) % fundedAccounts;
486 toIdx = (toIdx + r * 2) % fundedAccounts;
487 if (toIdx == fromIdx)
488 toIdx = (toIdx + 1) % fundedAccounts;
491 for (
int i = 0; i < newTxes; ++i)
569 uint256 hash = finishLedgerHash;
571 for (; i < totalReplay; ++i)
576 hash = l->header().parentHash;
584 int totalRound = 100;
585 for (
int i = 0; i < totalRound; ++i)
589 if (i < totalRound - 1)
598 int totalRound = 100;
599 for (
int i = 0; i < totalRound; ++i)
615 if (i < totalRound - 1)
633 return t->parameter_.finishHash_ == hash && t->parameter_.totalLedgers_ == totalReplay;
669 return i->second.lock();
679 return i->second.lock();
682 template <
typename T>
702 if (
taskStatus(task->skipListAcquirer_) == skiplistExpect)
704 if (task->deltas_.size() == deltaExpects.
size())
706 for (
int i = 0; i < deltaExpects.
size(); ++i)
708 if (
taskStatus(task->deltas_[i]) != deltaExpects[i])
726 auto t =
findTask(hash, totalReplay);
734 return asExpected(t, taskExpect, skiplistExpect, deltaExpects);
745 auto t =
findTask(hash, totalReplay);
753 return asExpected(t, taskExpect, skiplistExpect, deltaExpects);
767 return checkStatus(hash, totalReplay, taskExpect, skiplistExpect, deltaExpects);
844 request->set_ledgerhash(l->header().hash.data(), l->header().hash.size());
845 request->set_type(protocol::TMLedgerMapType::lmACCOUNT_STATE);
848 BEAST_EXPECT(reply->has_error());
849 BEAST_EXPECT(!server.msgHandler.processProofPathResponse(reply));
854 request->set_type(protocol::TMLedgerMapType::lmACCOUNT_STATE);
857 request->set_ledgerhash(hash.
data(), hash.
size());
860 BEAST_EXPECT(reply->has_error());
866 request->set_ledgerhash(l->header().hash.data(), l->header().hash.size());
867 request->set_type(protocol::TMLedgerMapType::lmACCOUNT_STATE);
872 BEAST_EXPECT(!reply->has_error());
873 BEAST_EXPECT(server.msgHandler.processProofPathResponse(reply));
880 reply->set_ledgerheader(r);
881 BEAST_EXPECT(!server.msgHandler.processProofPathResponse(reply));
883 reply->set_ledgerheader(r);
884 BEAST_EXPECT(server.msgHandler.processProofPathResponse(reply));
886 reply->mutable_path()->RemoveLast();
887 BEAST_EXPECT(!server.msgHandler.processProofPathResponse(reply));
904 BEAST_EXPECT(reply->has_error());
905 BEAST_EXPECT(!server.msgHandler.processReplayDeltaResponse(reply));
908 request->set_ledgerhash(hash.
data(), hash.
size());
911 BEAST_EXPECT(reply->has_error());
912 BEAST_EXPECT(!server.msgHandler.processReplayDeltaResponse(reply));
918 request->set_ledgerhash(l->header().hash.data(), l->header().hash.size());
921 BEAST_EXPECT(!reply->has_error());
922 BEAST_EXPECT(server.msgHandler.processReplayDeltaResponse(reply));
929 reply->set_ledgerheader(r);
930 BEAST_EXPECT(!server.msgHandler.processReplayDeltaResponse(reply));
932 reply->set_ledgerheader(r);
933 BEAST_EXPECT(server.msgHandler.processReplayDeltaResponse(reply));
935 reply->mutable_transaction()->RemoveLast();
936 BEAST_EXPECT(!server.msgHandler.processReplayDeltaResponse(reply));
948 for (
int i = 0; i < count; ++i)
954 BEAST_EXPECT(!tp10.
update(
uint256(777), 5, makeSkipList(10)));
956 BEAST_EXPECT(tp10.
update(
uint256(10), 10, makeSkipList(10)));
984 BEAST_EXPECT(tp20.
update(
uint256(20), 20, makeSkipList(20)));
1025 auto handshake = [&](
bool client,
bool server,
bool expecting) ->
bool {
1028 http_request.version(request.version());
1029 http_request.base() = request.base();
1031 if (serverResult != expecting)
1039 if (clientResult != expecting)
1045 BEAST_EXPECT(handshake(
false,
false,
false));
1046 BEAST_EXPECT(handshake(
false,
true,
false));
1047 BEAST_EXPECT(handshake(
true,
false,
false));
1048 BEAST_EXPECT(handshake(
true,
true,
true));
1054 testcase(
"local node has all the ledgers");
1059 NetworkOfTwo net(*
this, {totalReplay + 1}, psBhvr, ilBhvr, peerFeature);
1062 uint256 finalHash = l->header().hash;
1063 for (
int i = 0; i < totalReplay; ++i)
1068 net.client.ledgerMaster.storeLedger(l);
1069 l = net.server.ledgerMaster.getLedgerByHash(l->header().parentHash);
1078 BEAST_EXPECT(net.client.waitAndCheckStatus(
1082 net.client.replayer.sweep();
1083 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1089 testcase(
"all the ledgers from InboundLedgers");
1094 uint256 finalHash = l->header().hash;
1098 BEAST_EXPECT(net.client.waitAndCheckStatus(
1102 net.client.replayer.sweep();
1103 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1109 switch (peerSetBehavior)
1115 testcase(
"network drops 50% messages");
1118 testcase(
"network repeats all messages");
1133 uint256 finalHash = l->header().hash;
1134 for (
int i = 0; i < totalReplay - 1; ++i)
1136 l = net.server.ledgerMaster.getLedgerByHash(l->header().parentHash);
1138 net.client.ledgerMaster.storeLedger(l);
1143 BEAST_EXPECT(net.client.waitAndCheckStatus(
1145 BEAST_EXPECT(net.client.waitForLedgers(finalHash, totalReplay));
1148 net.client.replayer.sweep();
1149 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1156 int totalReplay = 3;
1165 uint256 finalHash = l->header().hash;
1172 BEAST_EXPECT(net.client.countsAsExpected(1, 1, 0));
1173 net.client.replayer.stop();
1174 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1180 testcase(
"SkipListAcquire bad reply");
1181 int totalReplay = 3;
1184 {totalReplay + 1 + 1},
1190 uint256 finalHash = l->header().hash;
1193 auto skipList = net.client.findSkipListAcquire(finalHash);
1195 std::uint8_t payload[55] = {0x6A, 0x09, 0xE6, 0x67, 0xF3, 0xBC, 0xC9, 0x08, 0xB2};
1197 skipList->processData(l->seq(), item);
1200 BEAST_EXPECT(net.client.waitAndCheckStatus(
1205 BEAST_EXPECT(net.client.waitAndCheckStatus(
1207 BEAST_EXPECT(net.client.countsAsExpected(2, 1, 0));
1213 testcase(
"LedgerDeltaAcquire bad reply");
1214 int totalReplay = 3;
1223 uint256 finalHash = l->header().hash;
1224 net.client.ledgerMaster.storeLedger(l);
1227 auto delta = net.client.findLedgerDeltaAcquire(l->header().parentHash);
1232 BEAST_EXPECT(net.client.taskStatus(net.client.findTask(finalHash, totalReplay)) ==
TaskStatus::Failed);
1236 BEAST_EXPECT(net.client.taskStatus(net.client.findTask(finalHash, totalReplay + 1)) ==
TaskStatus::Failed);
1243 int totalReplay = 5;
1246 {totalReplay * 3 + 1},
1251 uint256 finalHash = l->header().hash;
1254 BEAST_EXPECT(net.client.waitAndCheckStatus(
1256 BEAST_EXPECT(net.client.waitForLedgers(finalHash, totalReplay));
1260 BEAST_EXPECT(net.client.countsAsExpected(1, 1, totalReplay - 1));
1263 BEAST_EXPECT(net.client.countsAsExpected(2, 1, totalReplay - 1));
1266 for (
int i = 0; i < totalReplay + 2; ++i)
1268 l = net.server.ledgerMaster.getLedgerByHash(l->header().parentHash);
1270 auto finalHash_early = l->header().hash;
1272 BEAST_EXPECT(net.client.waitAndCheckStatus(
1278 BEAST_EXPECT(net.client.waitForLedgers(finalHash_early, totalReplay));
1279 BEAST_EXPECT(net.client.countsAsExpected(3, 2, 2 * (totalReplay - 1)));
1282 l = net.server.ledgerMaster.getLedgerByHash(l->header().parentHash);
1283 auto finalHash_moreEarly = l->header().parentHash;
1285 BEAST_EXPECT(net.client.waitAndCheckStatus(
1286 finalHash_moreEarly,
1291 BEAST_EXPECT(net.client.waitForLedgers(finalHash_moreEarly, totalReplay));
1292 BEAST_EXPECT(net.client.countsAsExpected(4, 3, 2 * (totalReplay - 1) + 2));
1297 BEAST_EXPECT(net.client.waitAndCheckStatus(
1303 BEAST_EXPECT(net.client.waitForLedgers(finalHash, totalReplay * 3));
1304 BEAST_EXPECT(net.client.countsAsExpected(5, 3, totalReplay * 3 - 1));
1307 net.client.replayer.sweep();
1308 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1339 testcase(
"SkipListAcquire timeout");
1340 int totalReplay = 3;
1349 uint256 finalHash = l->header().hash;
1353 BEAST_EXPECT(net.client.waitAndCheckStatus(
1357 BEAST_EXPECT(net.client.countsAsExpected(1, 1, 0));
1358 net.client.replayer.sweep();
1359 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1365 testcase(
"LedgerDeltaAcquire timeout");
1366 int totalReplay = 3;
1375 uint256 finalHash = l->header().hash;
1376 net.client.ledgerMaster.storeLedger(l);
1381 BEAST_EXPECT(net.client.waitAndCheckStatus(
1385 BEAST_EXPECT(net.client.countsAsExpected(1, 1, totalReplay - 1));
1386 net.client.replayer.sweep();
1387 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1404 int totalReplay = 250;
1408 {totalReplay * rounds + 1},
1414 auto l = net.server.ledgerMaster.getClosedLedger();
1415 for (
int i = 0; i < rounds; ++i)
1417 finishHashes.
push_back(l->header().hash);
1418 for (
int j = 0; j < totalReplay; ++j)
1420 l = net.server.ledgerMaster.getLedgerByHash(l->header().parentHash);
1423 BEAST_EXPECT(finishHashes.size() == rounds);
1425 for (
int i = 0; i < rounds; ++i)
1431 for (
int i = 0; i < rounds; ++i)
1433 BEAST_EXPECT(net.client.waitAndCheckStatus(
1437 BEAST_EXPECT(net.client.waitForLedgers(finishHashes[0], totalReplay * rounds));
1438 BEAST_EXPECT(net.client.countsAsExpected(rounds, rounds, rounds * (totalReplay - 1)));
1441 net.client.replayer.sweep();
1442 BEAST_EXPECT(net.client.countsAsExpected(0, 0, 0));
1448BEAST_DEFINE_TESTSUITE(LedgerReplayerTimeout, app,
xrpl);
1449BEAST_DEFINE_TESTSUITE_MANUAL(LedgerReplayerLong, app,
xrpl);
A version-independent IP address and port combination.
testcase_t testcase
Memberspace for declaring test cases.
virtual Config & config()=0
void loadFromString(std::string const &fileContents)
Load the config from the contents of the string.
Manages the lifetime of inbound ledgers.
bool storeLedger(std::shared_ptr< Ledger const > ledger)
std::shared_ptr< Ledger const > getClosedLedger()
std::shared_ptr< Ledger const > getLedgerByHash(uint256 const &hash)
bool processProofPathResponse(std::shared_ptr< protocol::TMProofPathResponse > const &msg)
Process TMProofPathResponse.
protocol::TMProofPathResponse processProofPathRequest(std::shared_ptr< protocol::TMProofPathRequest > const &msg)
Process TMProofPathRequest and return TMProofPathResponse.
bool processReplayDeltaResponse(std::shared_ptr< protocol::TMReplayDeltaResponse > const &msg)
Process TMReplayDeltaResponse.
protocol::TMReplayDeltaResponse processReplayDeltaRequest(std::shared_ptr< protocol::TMReplayDeltaRequest > const &msg)
Process TMReplayDeltaRequest and return TMReplayDeltaResponse.
bool update(uint256 const &hash, std::uint32_t seq, std::vector< uint256 > const &sList)
fill all the fields that was not filled during construction
bool canMergeInto(TaskParameter const &existingTask) const
check if this task can be merged into an existing task
InboundLedger::Reason reason_
std::uint32_t totalLedgers_
Manages the lifetime of ledger replay tasks.
hash_map< uint256, std::weak_ptr< SkipListAcquire > > skipLists_
std::vector< std::shared_ptr< LedgerReplayTask > > tasks_
hash_map< uint256, std::weak_ptr< LedgerDeltaAcquire > > deltas_
beast::severities::Severity threshold() const
Supports data retrieval by managing a set of peers.
Represents a peer connection in the overlay.
std::uint32_t id_t
Uniquely identifies a peer.
virtual LedgerMaster & getLedgerMaster()=0
An immutable linear range of bytes.
static constexpr std::size_t size()
Ledger replay client side.
TaskStatus taskStatus(std::shared_ptr< T > const &t)
std::size_t countDeltas()
std::vector< std::shared_ptr< LedgerReplayTask > > getTasks()
bool asExpected(uint256 const &hash, int totalReplay, TaskStatus taskExpect, TaskStatus skiplistExpect, std::vector< TaskStatus > const &deltaExpects)
LedgerMaster & ledgerMaster
MagicInboundLedgers inboundLedgers
std::size_t countSkipLists()
LedgerReplayMsgHandler clientMsgHandler
bool haveLedgers(uint256 const &finishLedgerHash, int totalReplay)
void addLedger(std::shared_ptr< Ledger const > const &l)
std::shared_ptr< SkipListAcquire > findSkipListAcquire(uint256 const &hash)
bool countsAsExpected(std::size_t tasks, std::size_t skipLists, std::size_t deltas)
bool waitForLedgers(uint256 const &finishLedgerHash, int totalReplay)
LedgerReplayMsgHandler serverMsgHandler
LedgerReplayClient(beast::unit_test::suite &suite, LedgerServer &server, PeerSetBehavior behavior=PeerSetBehavior::Good, InboundLedgersBehavior inboundBhvr=InboundLedgersBehavior::Good, PeerFeature peerFeature=PeerFeature::LedgerReplayEnabled)
bool waitAndCheckStatus(uint256 const &hash, int totalReplay, TaskStatus taskExpect, TaskStatus skiplistExpect, std::vector< TaskStatus > const &deltaExpects)
bool asExpected(std::shared_ptr< LedgerReplayTask > const &task, TaskStatus taskExpect, TaskStatus skiplistExpect, std::vector< TaskStatus > const &deltaExpects)
std::shared_ptr< LedgerReplayTask > findTask(uint256 const &hash, int totalReplay)
bool checkStatus(uint256 const &hash, int totalReplay, TaskStatus taskExpect, TaskStatus skiplistExpect, std::vector< TaskStatus > const &deltaExpects)
std::shared_ptr< LedgerDeltaAcquire > findLedgerDeltaAcquire(uint256 const &hash)
Simulate a network InboundLedgers.
virtual void sweep() override
virtual size_t cacheSize() override
virtual void logFailure(uint256 const &h, std::uint32_t seq) override
MagicInboundLedgers(LedgerMaster &ledgerSource, LedgerMaster &ledgerSink, InboundLedgersBehavior bhvr)
virtual void gotFetchPack() override
InboundLedgersBehavior bhvr
virtual ~MagicInboundLedgers()=default
LedgerMaster & ledgerSink
virtual void stop() override
virtual void acquireAsync(uint256 const &hash, std::uint32_t seq, InboundLedger::Reason reason) override
virtual void clearFailures() override
virtual bool gotLedgerData(LedgerHash const &ledgerHash, std::shared_ptr< Peer >, std::shared_ptr< protocol::TMLedgerData >) override
LedgerMaster & ledgerSource
virtual std::shared_ptr< Ledger const > acquire(uint256 const &hash, std::uint32_t seq, InboundLedger::Reason) override
virtual Json::Value getInfo() override
virtual std::size_t fetchRate() override
Returns the rate of historical ledger fetches per minute.
virtual std::shared_ptr< InboundLedger > find(LedgerHash const &hash) override
virtual void onLedgerFetched() override
Called when a complete ledger is obtained.
virtual bool isFailure(uint256 const &h) override
virtual void gotStaleData(std::shared_ptr< protocol::TMLedgerData > packet) override
LedgerReplayMsgHandler & local
LedgerReplayMsgHandler & remote
TestPeerSetBuilder(LedgerReplayMsgHandler &me, LedgerReplayMsgHandler &other, PeerSetBehavior bhvr, PeerFeature peerFeature)
std::unique_ptr< PeerSet > build() override
void cycleStatus() override
uint256 const & getClosedLedgerHash() const override
std::optional< std::size_t > publisherListSequence(PublicKey const &) const override
bool supportsFeature(ProtocolFeature f) const override
PublicKey const & getNodePublic() const override
beast::IP::Endpoint getRemoteAddress() const override
std::string const & fingerprint() const override
void ledgerRange(std::uint32_t &minSeq, std::uint32_t &maxSeq) const override
bool compressionEnabled() const override
void charge(Resource::Charge const &fee, std::string const &context={}) override
Adjust this peer's load balance based on the type of load imposed.
Json::Value json() override
bool ledgerReplayEnabled_
bool hasLedger(uint256 const &hash, std::uint32_t seq) const override
bool txReduceRelayEnabled() const override
TestPeer(bool enableLedgerReplay)
bool hasTxSet(uint256 const &hash) const override
int getScore(bool) const override
bool isHighLatency() const override
bool cluster() const override
Returns true if this connection is a member of the cluster.
void addTxQueue(uint256 const &) override
Aggregate transaction's hash.
void removeTxQueue(uint256 const &) override
Remove hash from the transactions' hashes queue.
void send(std::shared_ptr< Message > const &m) override
void sendTxQueue() override
Send aggregated transactions' hashes.
bool hasRange(std::uint32_t uMin, std::uint32_t uMax) override
void setPublisherListSequence(PublicKey const &, std::size_t const) override
Immutable cryptographic account descriptor.
A transaction testing environment.
bool close(NetClock::time_point closeTime, std::optional< std::chrono::milliseconds > consensusDelay=std::nullopt)
Close and advance the ledger.
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
beast::Journal const journal
Set the regular signature on a JTx.
T emplace_back(T... args)
boost::asio::ip::address Address
A namespace for easy access to logging severity values.
Severity
Severity level / threshold of a Journal message.
Keylet const & skip() noexcept
The index of the "short" skip list.
XRP_t const XRP
Converts to XRP Issue or STAmount.
Json::Value pay(AccountID const &account, AccountID const &to, AnyAmount amount)
Create a payment.
static autofill_t const autofill
std::unique_ptr< Config > envconfig()
creates and initializes a default configuration for jtx::Env
PrettyAmount drops(Integer i)
Returns an XRP PrettyAmount, which is trivially convertible to STAmount.
static uint256 ledgerHash(LedgerHeader const &info)
void logAll(LedgerServer &server, LedgerReplayClient &client, beast::severities::Severity level=Severity::kTrace)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
PublicKey derivePublicKey(KeyType type, SecretKey const &sk)
Derive the public key from a secret key.
boost::intrusive_ptr< SHAMapItem > make_shamapitem(uint256 const &tag, Slice data)
boost::beast::http::request< boost::beast::http::dynamic_body > http_request_type
auto makeRequest(bool crawlPublic, bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled) -> request_type
Make outbound http request.
bool peerFeatureEnabled(headers const &request, std::string const &feature, std::string value, bool config)
Check if a feature should be enabled for a peer.
SecretKey randomSecretKey()
Create a secret key using secure random numbers.
std::shared_ptr< Ledger > buildLedger(std::shared_ptr< Ledger const > const &parent, NetClock::time_point closeTime, bool const closeTimeCorrect, NetClock::duration closeResolution, Application &app, CanonicalTXSet &txns, std::set< TxID > &failedTxs, beast::Journal j)
Build a new ledger by applying consensus transactions.
http_response_type makeResponse(bool crawlPublic, http_request_type const &req, beast::IP::Address public_ip, beast::IP::Address remote_ip, uint256 const &sharedValue, std::optional< std::uint32_t > networkID, ProtocolVersion protocol, Application &app)
Make http response.
@ ledgerMaster
ledger master data for signing
static constexpr char FEATURE_LEDGER_REPLAY[]
void run() override
Runs the suite.
void run() override
Runs the suite.
void testSkipListTimeout()
void testLedgerDeltaTimeout()
void run() override
Runs the suite.
Test cases: LedgerReplayer_test: – process TMProofPathRequest and TMProofPathResponse – process TMRep...
void run() override
Runs the suite.
void testAllLocal(int totalReplay)
void testSkipListBadReply()
void testPeerSetBehavior(PeerSetBehavior peerSetBehavior, int totalReplay=4)
void testAllInboundLedgers(int totalReplay)
void testLedgerReplayOverlap()
void testLedgerDeltaBadReply()
Utility class for (1) creating ledgers with txns and (2) providing the ledgers via the ledgerMaster.
LedgerMaster & ledgerMaster
std::vector< jtx::Account > accounts
LedgerServer(beast::unit_test::suite &suite, Parameter const &p)
void createLedgerHistory()
create ledger history
void sendPayments(int newTxes)
LedgerReplayMsgHandler msgHandler
void createAccounts(int newAccounts)
NetworkOfTwo(beast::unit_test::suite &suite, LedgerServer::Parameter const ¶m, PeerSetBehavior behavior=PeerSetBehavior::Good, InboundLedgersBehavior inboundBhvr=InboundLedgersBehavior::Good, PeerFeature peerFeature=PeerFeature::LedgerReplayEnabled)
LedgerReplayClient client
Simulate a peerSet that supplies peers to ledger replay subtasks.
std::set< Peer::id_t > const & getPeerIds() const override
get the set of ids of previously added peers
LedgerReplayMsgHandler & local
std::shared_ptr< TestPeer > dummyPeer
TestPeerSet(LedgerReplayMsgHandler &me, LedgerReplayMsgHandler &other, PeerSetBehavior bhvr, bool enableLedgerReplay)
void sendRequest(::google::protobuf::Message const &msg, protocol::MessageType type, std::shared_ptr< Peer > const &peer) override
LedgerReplayMsgHandler & remote
void addPeers(std::size_t limit, std::function< bool(std::shared_ptr< Peer > const &)> hasItem, std::function< void(std::shared_ptr< Peer > const &)> onPeerAdded) override
Try add more peers.
Set the sequence number on a JTx.