v31.1-roots.1 · Commit 3: [PATCH 03/17] feat(policy): preserve cluster accounting and repair dynamic dust
src/rpc/mining.cpp
Before: src/rpc/mining.cpp · After: src/rpc/mining.cpp
File metadata
index 043e11ff63ad1eb6c5b30f97cb5ae3a4cfef3132..03c5392f564f701778ed5417dea86ffc220949a9 100644
Download original patch · Release notes
Diff rows 1–15 of 15. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/rpc/mining.cpp
CHANGED
|
@@ -533,11 +533,13 @@ static RPCHelpMan prioritisetransaction()
|
|
|
533
533
|
|
|
534
534
|
// Non-0 fee dust transactions are not allowed for entry, and modification not allowed afterwards
|
|
535
535
|
const auto& tx = mempool.get(txid);
|
|
536
|
-
if (mempool.m_opts.require_standard && tx && !GetDust(*tx, mempool.m_opts.dust_relay_feerate).empty()) {
|
|
536
|
+
if (mempool.m_opts.require_standard && tx && !GetDust(*tx, mempool.GetDustRelayFee()).empty()) {
|
|
537
537
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "Priority is not supported for transactions with dust outputs.");
|
|
538
538
|
}
|
|
539
539
|
|
|
540
|
-
mempool.PrioritiseTransaction(txid, nAmount);
|
|
540
|
+
if (!mempool.PrioritiseTransaction(txid, nAmount)) {
|
|
541
|
+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Fee delta would overflow native mempool graph accounting");
|
|
542
|
+
}
|
|
541
543
|
return true;
|
|
542
544
|
},
|
|
543
545
|
};
|