Skip to content

Commit b38077a

Browse files
committed
[RPC] Use "shield" nomenclature instead of "shielded"
Drop the "ed" suffix in the RPC scope, changes commands like `getnewshieldedaddress` to `getnewshieldaddress`. Also in blockchain informational calls; `shielded_pool_value` and `shieldedsupply` become `shield_pool_value` and `shieldsupply` respectively.
1 parent dc7eb08 commit b38077a

18 files changed

+341
-341
lines changed

src/rpc/blockchain.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex)
106106
result.pushKV("difficulty", GetDifficulty(blockindex));
107107
result.pushKV("chainwork", blockindex->nChainWork.GetHex());
108108
result.pushKV("acc_checkpoint", blockindex->nAccumulatorCheckpoint.GetHex());
109-
// Sapling shielded pool value
110-
result.pushKV("shielded_pool_value", ValuePoolDesc(blockindex->nChainSaplingValue, blockindex->nSaplingValue));
109+
// Sapling shield pool value
110+
result.pushKV("shield_pool_value", ValuePoolDesc(blockindex->nChainSaplingValue, blockindex->nSaplingValue));
111111
if (blockindex->pprev)
112112
result.pushKV("previousblockhash", blockindex->pprev->GetBlockHash().GetHex());
113113
CBlockIndex *pnext = chainActive.Next(blockindex);
@@ -594,7 +594,7 @@ UniValue getblockheader(const JSONRPCRequest& request)
594594
" \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n"
595595
" \"nonce\" : n, (numeric) The nonce\n"
596596
" \"bits\" : \"1d00ffff\", (string) The bits\n"
597-
" \"shielded_pool_value\": (object) Block shielded pool value\n"
597+
" \"shield_pool_value\": (object) Block shield pool value\n"
598598
" {\n"
599599
" \"chainValue\": (numeric) Total value held by the Sapling circuit up to and including this block\n"
600600
" \"valueDelta\": (numeric) Change in value held by the Sapling circuit over this block\n"
@@ -650,8 +650,8 @@ UniValue getsupplyinfo(const JSONRPCRequest& request)
650650
"{\n"
651651
" \"updateheight\" : n, (numeric) The chain height when the transparent supply was updated\n"
652652
" \"transparentsupply\" : n (numeric) The sum of all spendable transaction outputs at height updateheight\n"
653-
" \"shieldedsupply\": n (numeric) Chain tip shielded pool value\n"
654-
" \"totalsupply\": n (numeric) The sum of transparentsupply and shieldedsupply\n"
653+
" \"shieldsupply\": n (numeric) Chain tip shield pool value\n"
654+
" \"totalsupply\": n (numeric) The sum of transparentsupply and shieldsupply\n"
655655
"}\n"
656656

657657
"\nExamples:\n" +
@@ -670,7 +670,7 @@ UniValue getsupplyinfo(const JSONRPCRequest& request)
670670
ret.pushKV("updateheight", MoneySupply.GetCacheHeight());
671671
ret.pushKV("transparentsupply", ValueFromAmount(tSupply));
672672
Optional<CAmount> shieldedPoolValue = WITH_LOCK(cs_main, return (chainActive.Tip() ? chainActive.Tip()->nChainSaplingValue : nullopt); );
673-
ret.pushKV("shieldedsupply", ValuePoolDesc(shieldedPoolValue, nullopt)["chainValue"]);
673+
ret.pushKV("shieldsupply", ValuePoolDesc(shieldedPoolValue, nullopt)["chainValue"]);
674674
const CAmount totalSupply = tSupply + (shieldedPoolValue ? *shieldedPoolValue : 0);
675675
ret.pushKV("totalsupply", ValueFromAmount(totalSupply));
676676

@@ -980,7 +980,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
980980
" \"difficulty\": xxxxxx, (numeric) the current difficulty\n"
981981
" \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n"
982982
" \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n"
983-
" \"shielded_pool_value\": (object) Chain tip shielded pool value\n"
983+
" \"shield_pool_value\": (object) Chain tip shield pool value\n"
984984
" \"initial_block_downloading\" (boolean) whether the node is in initial block downloading state or not"
985985
" {\n"
986986
" \"chainValue\": (numeric) Total value held by the Sapling circuit up to and including the chain tip\n"
@@ -1020,8 +1020,8 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
10201020
obj.pushKV("difficulty", (double)GetDifficulty());
10211021
obj.pushKV("verificationprogress", Checkpoints::GuessVerificationProgress(pChainTip));
10221022
obj.pushKV("chainwork", pChainTip ? pChainTip->nChainWork.GetHex() : "");
1023-
// Sapling shielded pool value
1024-
obj.pushKV("shielded_pool_value", ValuePoolDesc(pChainTip->nChainSaplingValue, pChainTip->nSaplingValue));
1023+
// Sapling shield pool value
1024+
obj.pushKV("shield_pool_value", ValuePoolDesc(pChainTip->nChainSaplingValue, pChainTip->nSaplingValue));
10251025
obj.pushKV("initial_block_downloading", IsInitialBlockDownload());
10261026
UniValue softforks(UniValue::VARR);
10271027
softforks.push_back(SoftForkDesc("bip65", 5, pChainTip));

src/rpc/client.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static const CRPCConvertParam vRPCConvertParams[] = {
3939
{ "sendtoaddress", 1 },
4040
{ "settxfee", 0 },
4141
{ "getreceivedbyaddress", 1 },
42-
{ "listreceivedbyshieldedaddress", 1 },
42+
{ "listreceivedbyshieldaddress", 1 },
4343
{ "getreceivedbylabel", 1 },
4444
{ "listcoldutxos", 0 },
4545
{ "listdelegators", 0 },
@@ -54,14 +54,14 @@ static const CRPCConvertParam vRPCConvertParams[] = {
5454
{ "getbalance", 2 },
5555
{ "getbalance", 3 },
5656
{ "getbalance", 4 },
57-
{ "getshieldedbalance", 1 },
58-
{ "getshieldedbalance", 2 },
59-
{ "rawshieldedsendmany", 1 },
60-
{ "rawshieldedsendmany", 2 },
61-
{ "rawshieldedsendmany", 3 },
62-
{ "shieldedsendmany", 1 },
63-
{ "shieldedsendmany", 2 },
64-
{ "shieldedsendmany", 3 },
57+
{ "getshieldbalance", 1 },
58+
{ "getshieldbalance", 2 },
59+
{ "rawshieldsendmany", 1 },
60+
{ "rawshieldsendmany", 2 },
61+
{ "rawshieldsendmany", 3 },
62+
{ "shieldsendmany", 1 },
63+
{ "shieldsendmany", 2 },
64+
{ "shieldsendmany", 3 },
6565
{ "getblockhash", 0 },
6666
{ "waitforblockheight", 0 },
6767
{ "waitforblockheight", 1 },
@@ -89,10 +89,10 @@ static const CRPCConvertParam vRPCConvertParams[] = {
8989
{ "listunspent", 1 },
9090
{ "listunspent", 2 },
9191
{ "listunspent", 3 },
92-
{ "listshieldedunspent", 0 },
93-
{ "listshieldedunspent", 1 },
94-
{ "listshieldedunspent", 2 },
95-
{ "listshieldedunspent", 3 },
92+
{ "listshieldunspent", 0 },
93+
{ "listshieldunspent", 1 },
94+
{ "listshieldunspent", 2 },
95+
{ "listshieldunspent", 3 },
9696
{ "logging", 0 },
9797
{ "logging", 1 },
9898
{ "getblock", 1 },

src/rpc/misc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ UniValue getinfo(const JSONRPCRequest& request)
7171
" \"transparentsupply\" : n (numeric) The sum of the value of all unspent outputs when the chainstate was\n"
7272
" last flushed to disk (use getsupplyinfo to know the update-height, or\n"
7373
" to trigger the money supply update/recalculation)"
74-
" \"shieldedsupply\": n (numeric) Chain tip shielded pool value\n"
74+
" \"shieldsupply\": n (numeric) Chain tip shield pool value\n"
7575
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
7676
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
7777
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
@@ -133,7 +133,7 @@ UniValue getinfo(const JSONRPCRequest& request)
133133
UniValue supply_info = getsupplyinfo(JSONRPCRequest());
134134
obj.pushKV("moneysupply", supply_info["totalsupply"]);
135135
obj.pushKV("transparentsupply", supply_info["transparentsupply"]);
136-
obj.pushKV("shieldedsupply", supply_info["shieldedsupply"]);
136+
obj.pushKV("shieldsupply", supply_info["shieldsupply"]);
137137

138138
#ifdef ENABLE_WALLET
139139
if (pwalletMain) {

src/sapling/saplingscriptpubkeyman.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ Optional<std::pair<
634634
ovks.emplace(getCommonOVK());
635635
} catch (...) {
636636
LogPrintf("WARNING: No CommonOVK found. Some notes might not be correctly recovered. "
637-
"Unlock the wallet and call 'viewshieldedtransaction %s' to fix.\n", txId.ToString());
637+
"Unlock the wallet and call 'viewshieldtransaction %s' to fix.\n", txId.ToString());
638638
}
639639
} else {
640640
for (const auto& spend : tx.sapData->vShieldedSpend) {
@@ -762,7 +762,7 @@ bool SaplingScriptPubKeyMan::IsNoteSaplingChange(const std::set<std::pair<libzca
762762
// also spent Notes in the same transaction. This will catch,
763763
// for instance:
764764
// - Change created by spending fractions of Notes (because
765-
// shieldedsendmany sends change to the originating shielded address).
765+
// shieldsendmany sends change to the originating shielded address).
766766
// - Notes sent from one address to itself.
767767
const auto& tx = wallet->mapWallet[op.hash];
768768
if (tx.sapData) {

0 commit comments

Comments
 (0)