From 5d5b47d05a670fedc0c62b0a7a663bc7e1c28470 Mon Sep 17 00:00:00 2001 From: DanS Date: Wed, 28 Oct 2026 12:59:46 -0500 Subject: [PATCH] wallet/rpc: z_consolidate is not safe-mode; say which units it uses z_consolidate creates and broadcasts transactions, so like z_sendmany and z_shieldcoinbase it must not run in safe mode. Its fee argument is in DRGX, like z_sendmany's, while -consolidationtxfee and every amount in z_consolidationstatus are in puposhis; the help and the doc now say so. Co-Authored-By: Claude Opus 5.5 --- doc/zsweep-consolidation.md | 3 ++- src/wallet/rpcwallet.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/zsweep-consolidation.md b/doc/zsweep-consolidation.md index caf5bc70c..c809989c2 100644 --- a/doc/zsweep-consolidation.md +++ b/doc/zsweep-consolidation.md @@ -103,7 +103,8 @@ witness rebuilds. Consolidation keeps that in check. `dragonx-cli z_consolidate` runs one round now with the current settings, also when `consolidation` is off, so a CLI miner can clean up whenever it suits them. It takes optional overrides, in order: fee (in DRAGONX), batch size, maximum transactions per address, and a JSON array of addresses; pass `null` to keep a setting, e.g. -`dragonx-cli z_consolidate null 50 20 '["zs1..."]'`. It returns an operation id; `z_getoperationstatus` / +`dragonx-cli z_consolidate null 50 20 '["zs1..."]'`. Its fee is in DRAGONX like `z_sendmany`'s, while `consolidationtxfee` and the amounts in +`z_consolidationstatus` are in puposhis. It returns an operation id; `z_getoperationstatus` / `z_getoperationresult` give the result. It refuses while the node is syncing, while the wallet is locked, and while a consolidation, zsweep or auto-shield round is in flight. diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index fc419b4d7..5b0457870 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3448,6 +3448,8 @@ UniValue z_consolidate(const UniValue& params, bool fHelp, const CPubKey& mypk) " with -zsweep on, only the sweep address (also the default then)\n" "\nResult:\n" "\"operationid\" (string) An operationid to pass to z_getoperationstatus to get the result.\n" + "The fee here is in " + CURRENCY_UNIT + ", like z_sendmany's; -consolidationtxfee and the amounts in\n" + "z_consolidationstatus are in puposhis (1 " + CURRENCY_UNIT + " = 100000000).\n" "\nExamples:\n" + HelpExampleCli("z_consolidate", "") + HelpExampleCli("z_consolidate", "null 50 20 '[\"zs1...\"]'") @@ -6698,7 +6700,7 @@ static const CRPCCommand commands[] = { "wallet", "z_sweepstatus", &z_sweepstatus, true }, { "wallet", "z_autoshieldstatus", &z_autoshieldstatus, true }, { "wallet", "z_consolidationstatus", &z_consolidationstatus, true }, - { "wallet", "z_consolidate", &z_consolidate, true }, + { "wallet", "z_consolidate", &z_consolidate, false }, { "wallet", "z_sendmany", &z_sendmany, false }, { "wallet", "z_shieldcoinbase", &z_shieldcoinbase, false }, { "wallet", "z_getoperationstatus", &z_getoperationstatus, true },