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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/rpc/mining.cpp
CHANGED
|
@@ -533,11 +533,13 @@ static RPCHelpMan prioritisetransaction()
|
|
| 533 |
|
| 534 |
// Non-0 fee dust transactions are not allowed for entry, and modification not allowed afterwards
|
| 535 |
const auto& tx = mempool.get(txid);
|
| 536 |
-
if (mempool.m_opts.require_standard && tx && !GetDust(*tx, mempool.m_opts.dust_relay_feerate).empty()) {
|
| 537 |
throw JSONRPCError(RPC_INVALID_PARAMETER, "Priority is not supported for transactions with dust outputs.");
|
| 538 |
}
|
| 539 |
|
| 540 |
-
mempool.PrioritiseTransaction(txid, nAmount);
|
|
|
|
|
|
|
| 541 |
return true;
|
| 542 |
},
|
| 543 |
};
|
|
|
|
| 533 |
|
| 534 |
// Non-0 fee dust transactions are not allowed for entry, and modification not allowed afterwards
|
| 535 |
const auto& tx = mempool.get(txid);
|
| 536 |
+
if (mempool.m_opts.require_standard && tx && !GetDust(*tx, mempool.GetDustRelayFee()).empty()) {
|
| 537 |
throw JSONRPCError(RPC_INVALID_PARAMETER, "Priority is not supported for transactions with dust outputs.");
|
| 538 |
}
|
| 539 |
|
| 540 |
+
if (!mempool.PrioritiseTransaction(txid, nAmount)) {
|
| 541 |
+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Fee delta would overflow native mempool graph accounting");
|
| 542 |
+
}
|
| 543 |
return true;
|
| 544 |
},
|
| 545 |
};
|