> loading_
# ── Fix 1: RPCSub credential update on resubscribe ──────────────────────
# File: src/xrpld/rpc/handlers/subscribe/Subscribe.cpp
# Lines 36-49 already correctly resolve credentials from either field name:
# strUsername = context.params[jss::url_username] || context.params[jss::username]
# strPassword = context.params[jss::url_password] || context.params[jss::password]
#
# Problem: Lines 73-88 (the reuse branch) only check the deprecated fields:
# if (context.params.isMember(jss::username)) // <-- misses url_username
# rpcSub->setUsername(...);
#
# Fix: Replace the conditional checks with unconditional calls using the
# already-resolved variables. The values default to empty strings if absent,
# so this is safe:
# rpcSub->setUsername(strUsername); // always set, already resolved above
# rpcSub->setPassword(strPassword); // always set, already resolved above
# This mirrors the resolution logic and removes the deprecated-field-only gate.
# ── Fix 2: TransactionEntry zero-hash race condition (API v2) ───────────
# File: src/xrpld/rpc/handlers/transaction/TransactionEntry.cpp
# Lines ~61-65, inside the `if (!lpLedger->open())` block for v2:
#
# // BEFORE (racy):
# uint256 uLedgerHash = context.ledgerMaster.getHashBySeq(lpLedger->seq());
# jvResult[jss::ledger_hash] = to_string(uLedgerHash);
#
# // AFTER (deterministic – use the ledger object we already hold):
# jvResult[jss::ledger_hash] = to_string(lpLedger->info().hash);
#
# getHashBySeq hits a cache that can miss under load; the ledger object
# itself always carries its own hash. One-line replacement, no new deps.
# ── Fix 3: checkMultiSignFields returns string instead of error JSON ────
# File: src/xrpld/rpc/handlers/TransactionSign.cpp
# Line ~1032:
#
# // BEFORE (returns bare string, invisible to contains_error()):
# if (!request.isMember(jss::tx_json) || !request[jss::tx_json].isObject())
# return RPC::invalid_field_message(jss::tx_json);
#
# // AFTER (returns proper JSON error object):
# if (!request.isMember(jss::tx_json) || !request[jss::tx_json].isObject())
# return RPC::make_error(
# rpcINVALID_PARAMS,
# RPC::invalid_field_message(jss::tx_json));
#
# Audit nearby helpers (checkSingleSign, transactionSignFor) for the same
# pattern with invalid_field_message / missing_field_message.
#
# Add a test in src/test/rpc/:
# // Submit sign_for with tx_json set to a string instead of an object
# auto const result = env.rpc("sign_for", ..., "tx_json", "not_an_object");
# BEAST_EXPECT(result.isMember(jss::error));
# BEAST_EXPECT(result[jss::error] == "invalidParams");