Skip to content

Commit 038b776

Browse files
committed
Merge remote-tracking branch 'XRPLF/ximinez/lending-refactoring-4' into ximinez/lending-XLS-66
* XRPLF/ximinez/lending-refactoring-4: fixup! Rename Transactor preflight functions Rename Transactor preflight functions fixup! Make preflight1 and preflight2 private static Transactor functions Make preflight1 and preflight2 private static Transactor functions Fix formatting
2 parents 2f3c798 + 68aecfe commit 038b776

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/test/app/AMM_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7485,7 +7485,8 @@ struct AMM_test : public jtx::AMMTest
74857485

74867486
auto const testCase = [&](std::string suffix, FeatureBitset features) {
74877487
testcase("Fail pseudo-account allocation " + suffix);
7488-
Env env{*this, features};
7488+
std::string logs;
7489+
Env env{*this, features, std::make_unique<CaptureLogs>(&logs)};
74897490
env.fund(XRP(30'000), gw, alice);
74907491
env.close();
74917492
env(trust(alice, gw["USD"](30'000), 0));

src/xrpld/app/main/Application.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ class ApplicationImp : public Application, public BasicApp
305305
static_cast<int>(std::thread::hardware_concurrency());
306306

307307
// Be more aggressive about the number of threads to use
308-
// for the job queue if the server is configured as "large"
309-
// or "huge" if there are enough cores.
308+
// for the job queue if the server is configured as
309+
// "large" or "huge" if there are enough cores.
310310
if (config->NODE_SIZE >= 4 && count >= 16)
311311
count = 6 + std::min(count, 8);
312312
else if (config->NODE_SIZE >= 3 && count >= 8)

src/xrpld/app/tx/detail/Transactor.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ preflightCheckSimulateKeys(
120120
{
121121
if (flags & tapDRY_RUN) // simulation
122122
{
123-
if (!sigObject.getFieldVL(sfTxnSignature).empty())
123+
std::optional<Slice> const signature = sigObject[~sfTxnSignature];
124+
if (signature && !signature->empty())
124125
{
125126
// NOTE: This code should never be hit because it's checked in the
126127
// `simulate` RPC
@@ -144,7 +145,8 @@ preflightCheckSimulateKeys(
144145
}
145146
}
146147

147-
if (!sigObject.getFieldVL(sfSigningPubKey).empty())
148+
Slice const signingPubKey = sigObject[sfSigningPubKey];
149+
if (!signingPubKey.empty())
148150
{
149151
// trying to single-sign _and_ multi-sign a transaction
150152
return temINVALID;

0 commit comments

Comments
 (0)