You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fa6b061 rpc: Auto-format RPCResult (MarcoFalke)
fa7d050 rpc: Move OuterType enum to header (MarcoFalke)
Pull request description:
This enforces most syntax rules of the RPCResult at compile time (or some at run time during unit and functional tests)
Apart from normalizing the syntax, by separating stylistic formatting from the structure, we could in theory directly generate the html for e.g. https://bitcoincore.org/en/doc/0.19.0/rpc/wallet/importmulti/
ACKs for top commit:
Sjors:
Indeed, re-ACK fa6b061
ajtowns:
ACK fa6b061 -- skimmed code changes and differences to rpc help output
Tree-SHA512: 5b510b3aa0b7c7b9189a48c77593159409069f939145b9a00c5478e894cf65f994d44d633eb7bb7dbea40ee820645a2930976c24772379d96929002b120efa28
{"range", RPCArg::Type::RANGE, RPCArg::Optional::OMITTED_NAMED_ARG, "If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive."},
190
193
},
191
194
RPCResult{
192
-
"[ address ] (json array) the derived addresses\n"
195
+
RPCResult::Type::ARR, "", "",
196
+
{
197
+
{RPCResult::Type::STR, "address", "the derived addresses"},
"\"locked\" : { (json object) Information about locked memory manager\n"
442
-
"\"used\" : xxxxx, (numeric) Number of bytes used\n"
443
-
"\"free\" : xxxxx, (numeric) Number of bytes available in current arenas\n"
444
-
"\"total\" : xxxxxxx, (numeric) Total number of bytes managed\n"
445
-
"\"locked\" : xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.\n"
446
-
"\"chunks_used\" : xxxxx, (numeric) Number allocated chunks\n"
447
-
"\"chunks_free\" : xxxxx, (numeric) Number unused chunks\n"
448
-
" }\n"
449
-
"}\n"
446
+
RPCResult::Type::OBJ, "", "",
447
+
{
448
+
{RPCResult::Type::OBJ, "locked", "Information about locked memory manager",
449
+
{
450
+
{RPCResult::Type::NUM, "used", "Number of bytes used"},
451
+
{RPCResult::Type::NUM, "free", "Number of bytes available in current arenas"},
452
+
{RPCResult::Type::NUM, "total", "Total number of bytes managed"},
453
+
{RPCResult::Type::NUM, "locked", "Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk."},
0 commit comments