mirror of
https://github.com/Xahau/xahaud.git
synced 2026-01-17 05:05:15 +00:00
Compare commits
3 Commits
fix_inject
...
fixhookmet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd4cb12aa5 | ||
|
|
2dc5e670ac | ||
|
|
4dff5a5c8e |
@@ -1857,7 +1857,8 @@ hook::finalizeHookResult(
|
||||
uint16_t exec_index = avi.nextHookExecutionIndex();
|
||||
// apply emitted transactions to the ledger (by adding them to the emitted
|
||||
// directory) if we are allowed to
|
||||
std::map<uint256 /* txnid */, uint256 /* emit nonce */> emission_txnid;
|
||||
std::vector<std::pair<uint256 /* txnid */, uint256 /* emit nonce */>>
|
||||
emission_txnid;
|
||||
|
||||
if (doEmit)
|
||||
{
|
||||
@@ -1882,7 +1883,7 @@ hook::finalizeHookResult(
|
||||
.getField(sfEmitDetails)
|
||||
.downcast<STObject>();
|
||||
|
||||
emission_txnid.emplace(
|
||||
emission_txnid.emplace_back(
|
||||
id, emitDetails.getFieldH256(sfEmitNonce));
|
||||
sleEmitted = std::make_shared<SLE>(emittedId);
|
||||
|
||||
|
||||
@@ -386,6 +386,17 @@ LedgerHistory::handleMismatch(
|
||||
JLOG(j_.error()) << "built\n" << getJson({*builtLedger, {}});
|
||||
JLOG(j_.error()) << "valid\n" << getJson({*validLedger, {}});
|
||||
|
||||
{
|
||||
auto b = builtTx.begin();
|
||||
auto v = validTx.begin();
|
||||
while (b != builtTx.end() && v != validTx.end())
|
||||
{
|
||||
log_one(*builtLedger, (*b)->key(), "validInfo", j_);
|
||||
log_one(*validLedger, (*v)->key(), "builtInfo", j_);
|
||||
++b;
|
||||
++v;
|
||||
}
|
||||
}
|
||||
// Log all differences between built and valid ledgers
|
||||
auto b = builtTx.begin();
|
||||
auto v = validTx.begin();
|
||||
|
||||
@@ -47,9 +47,6 @@ getFailHard(RPC::JsonContext const& context)
|
||||
Json::Value
|
||||
doInject(RPC::JsonContext& context)
|
||||
{
|
||||
if (context.role != Role::ADMIN)
|
||||
return RPC::make_error(
|
||||
rpcNOT_SUPPORTED, "Signing is not supported by this server.");
|
||||
if (context.role != Role::ADMIN)
|
||||
return rpcError(rpcNO_PERMISSION);
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ Handler const handlerArray[]{
|
||||
{"ripple_path_find", byRef(&doRipplePathFind), Role::USER, NO_CONDITION},
|
||||
{"sign", byRef(&doSign), Role::USER, NO_CONDITION},
|
||||
{"sign_for", byRef(&doSignFor), Role::USER, NO_CONDITION},
|
||||
{"inject", byRef(&doInject), Role::USER, NEEDS_CURRENT_LEDGER},
|
||||
{"inject", byRef(&doInject), Role::ADMIN, NEEDS_CURRENT_LEDGER},
|
||||
{"submit", byRef(&doSubmit), Role::USER, NEEDS_CURRENT_LEDGER},
|
||||
{"submit_multisigned",
|
||||
byRef(&doSubmitMultiSigned),
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
auto vCurrent = BuildInfo::getEncodedVersion();
|
||||
BEAST_EXPECT(!BuildInfo::isNewerVersion(vCurrent));
|
||||
|
||||
auto vMax = BuildInfo::encodeSoftwareVersion("9999.12.30");
|
||||
auto vMax = BuildInfo::encodeSoftwareVersion("2100.12.30");
|
||||
BEAST_EXPECT(BuildInfo::isNewerVersion(vMax));
|
||||
|
||||
auto vRelease1 = BuildInfo::encodeSoftwareVersion("2023.1.1-release+1");
|
||||
|
||||
Reference in New Issue
Block a user