JSON doesn't allow a trailing comma in arrays
RPC: Remove final comma for last entry of fixed-size arrays/objects in RPCResult #18444
pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:bugfix_rr_arrfixed_comma changing 1 files +9 −1-
luke-jr commented at 8:32 PM on March 26, 2020: member
- DrahtBot added the label RPC/REST/ZMQ on Mar 26, 2020
-
sipa commented at 10:51 PM on March 26, 2020: member
linter failure:
CHECK_NONFATAL(condition) should be used instead of assert for RPC code. src/rpc/util.cpp:649: assert(!m_inner.empty()); - luke-jr force-pushed on Mar 26, 2020
-
MarcoFalke commented at 4:53 PM on March 27, 2020: member
Not sure if this is needed. The resulting doc is not JSON that you can copy paste into a JSON parser. Stuff like
...ornortrue|falseisn't valid JSON either.This is the rendered diff on my end:
diff --git a/getblockstats b/getblockstats index cff3f22..11fbf07 100644 --- a/getblockstats +++ b/getblockstats @@ -23,7 +23,7 @@ Result: n, (numeric) The 25th percentile feerate n, (numeric) The 50th percentile feerate n, (numeric) The 75th percentile feerate - n, (numeric) The 90th percentile feerate + n (numeric) The 90th percentile feerate ], "height" : n, (numeric) The height of the block "ins" : n, (numeric) The number of inputs (excluding coinbase)More broadly speaking, I don't see a valid use case for ARR_FIXED and it should probably be deprecated and removed in favour of self-documenting alternatives like a dictionary whose keys describe the value.
-
MarcoFalke commented at 5:52 PM on March 27, 2020: member
Fair enough. Though, I still think that the output is primarily for documentation purposes and not to please an imaginary JSON language lawyer
-
promag commented at 2:02 PM on March 28, 2020: member
Concept ACK, not a bugfix IMO.
-
MarcoFalke commented at 2:04 PM on March 28, 2020: member
If people want to do this, then it should also be done for fixed-size dicts
-
c34164896c
Bugfix: RPC: Remove final comma for last entry of fixed-size Arrays and Objects in RPCResult
JSON doesn't allow a trailing comma in Arrays/Objects
- luke-jr force-pushed on Mar 28, 2020
-
luke-jr commented at 5:33 PM on March 28, 2020: member
Extended it to handle JSON Objects
-
sipa commented at 6:35 PM on March 28, 2020: member
Concept ACK, not a bugfix, but certainly a mild improvement.
- MarcoFalke renamed this:
Bugfix: RPC: Remove final comma for last entry of fixed-size arrays in RPCResult
RPC: Remove final comma for last entry of fixed-size arrays/objects in RPCResult
on Mar 28, 2020 - MarcoFalke merged this on Mar 28, 2020
- MarcoFalke closed this on Mar 28, 2020
-
MarcoFalke commented at 8:57 PM on March 28, 2020: member
Btw, this is the rendered diff:
<details><summary>diff</summary>
diff --git a/addmultisigaddress b/addmultisigaddress index d061704..10fb22b 100644 --- a/addmultisigaddress +++ b/addmultisigaddress @@ -19,8 +19,8 @@ Arguments: Result: { (json object) "address" : "str", (string) The value of the new multisig address "redeemScript" : "hex", (string) The string value of the hex-encoded redemption script - "descriptor" : "str", (string) The descriptor for this multisig + "descriptor" : "str" (string) The descriptor for this multisig } Examples: diff --git a/analyzepsbt b/analyzepsbt index 301fa25..2d38149 100644 --- a/analyzepsbt +++ b/analyzepsbt @@ -8,30 +8,30 @@ Arguments: Result: { (json object) "inputs" : [ (json array) { (json object) "has_utxo" : true|false, (boolean) Whether a UTXO is provided "is_final" : true|false, (boolean) Whether the input is finalized "missing" : { (json object, optional) Things that are missing that are required to complete this input "pubkeys" : [ (json array, optional) "hex", (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing ... ], "signatures" : [ (json array, optional) "hex", (string) Public key ID, hash160 of the public key, of a public key whose signature is missing ... ], "redeemscript" : "hex", (string, optional) Hash160 of the redeemScript that is missing - "witnessscript" : "hex", (string, optional) SHA256 of the witnessScript that is missing + "witnessscript" : "hex" (string, optional) SHA256 of the witnessScript that is missing }, - "next" : "str", (string, optional) Role of the next person that this input needs to go to + "next" : "str" (string, optional) Role of the next person that this input needs to go to }, ... ], "estimated_vsize" : n, (numeric, optional) Estimated vsize of the final signed transaction "estimated_feerate" : n, (numeric, optional) Estimated feerate of the final signed transaction in BTC/kB. Shown only if all UTXO slots in the PSBT have been filled "fee" : n, (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled "next" : "str", (string) Role of the next person that this psbt needs to go to - "error" : "str", (string) Error message if there is one + "error" : "str" (string) Error message if there is one } Examples: diff --git a/bumpfee b/bumpfee index 89596bb..9b21dfe 100644 --- a/bumpfee +++ b/bumpfee @@ -36,13 +36,13 @@ Arguments: Result: { (json object) "psbt" : "str", (string) The base64-encoded unsigned PSBT of the new transaction. Only returned when wallet private keys are disabled. "txid" : "hex", (string) The id of the new transaction. Only returned when wallet private keys are enabled. "origfee" : n, (numeric) The fee of the replaced transaction. "fee" : n, (numeric) The fee of the new transaction. "errors" : [ (json array) Errors encountered during processing (may be empty). "str", (string) ... - ], + ] } Examples: diff --git a/createmultisig b/createmultisig index 432a1a3..e2d97b0 100644 --- a/createmultisig +++ b/createmultisig @@ -15,8 +15,8 @@ Arguments: Result: { (json object) "address" : "str", (string) The value of the new multisig address. "redeemScript" : "hex", (string) The string value of the hex-encoded redemption script. - "descriptor" : "str", (string) The descriptor for this multisig + "descriptor" : "str" (string) The descriptor for this multisig } Examples: diff --git a/createwallet b/createwallet index 5a6ea93..c0244b0 100644 --- a/createwallet +++ b/createwallet @@ -12,7 +12,7 @@ Arguments: Result: { (json object) "name" : "str", (string) The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path. - "warning" : "str", (string) Warning message if wallet was not loaded cleanly. + "warning" : "str" (string) Warning message if wallet was not loaded cleanly. } Examples: diff --git a/decodepsbt b/decodepsbt index bd64cae..06e11e0 100644 --- a/decodepsbt +++ b/decodepsbt @@ -8,91 +8,91 @@ Arguments: Result: { (json object) "tx" : { (json object) The decoded network-serialized unsigned transaction. - ... The layout is the same as the output of decoderawtransaction. + .. The layout is the same as the output of decoderawtransaction. }, "unknown" : { (json object) The unknown global fields "key" : "hex", (string) (key-value pair) An unknown key-value pair ... }, "inputs" : [ (json array) { (json object) "non_witness_utxo" : { (json object, optional) Decoded network transaction for non-witness UTXOs - ... + .. }, "witness_utxo" : { (json object, optional) Transaction output for witness UTXOs "amount" : n, (numeric) The value in BTC "scriptPubKey" : { (json object) "asm" : "str", (string) The asm "hex" : "hex", (string) The hex "type" : "str", (string) The type, eg 'pubkeyhash' - "address" : "str", (string) Bitcoin address if there is one - }, + "address" : "str" (string) Bitcoin address if there is one + } }, "partial_signatures" : { (json object, optional) "pubkey" : "str", (string) The public key and signature that corresponds to it. ... }, "sighash" : "str", (string, optional) The sighash type to be used "redeem_script" : { (json object, optional) "asm" : "str", (string) The asm "hex" : "hex", (string) The hex - "type" : "str", (string) The type, eg 'pubkeyhash' + "type" : "str" (string) The type, eg 'pubkeyhash' }, "witness_script" : { (json object, optional) "asm" : "str", (string) The asm "hex" : "hex", (string) The hex - "type" : "str", (string) The type, eg 'pubkeyhash' + "type" : "str" (string) The type, eg 'pubkeyhash' }, "bip32_derivs" : [ (json array, optional) { (json object, optional) The public key with the derivation path as the value. "master_fingerprint" : "str", (string) The fingerprint of the master key - "path" : "str", (string) The path + "path" : "str" (string) The path }, ... ], "final_scriptsig" : { (json object, optional) "asm" : "str", (string) The asm - "hex" : "str", (string) The hex + "hex" : "str" (string) The hex }, "final_scriptwitness" : [ (json array) "hex", (string) hex-encoded witness data (if any) ... ], "unknown" : { (json object) The unknown global fields "key" : "hex", (string) (key-value pair) An unknown key-value pair ... - }, + } }, ... ], "outputs" : [ (json array) { (json object) "redeem_script" : { (json object, optional) "asm" : "str", (string) The asm "hex" : "hex", (string) The hex - "type" : "str", (string) The type, eg 'pubkeyhash' + "type" : "str" (string) The type, eg 'pubkeyhash' }, "witness_script" : { (json object, optional) "asm" : "str", (string) The asm "hex" : "hex", (string) The hex - "type" : "str", (string) The type, eg 'pubkeyhash' + "type" : "str" (string) The type, eg 'pubkeyhash' }, "bip32_derivs" : [ (json array, optional) { (json object) "pubkey" : "str", (string) The public key this path corresponds to "master_fingerprint" : "str", (string) The fingerprint of the master key - "path" : "str", (string) The path + "path" : "str" (string) The path }, ... ], "unknown" : { (json object) The unknown global fields "key" : "hex", (string) (key-value pair) An unknown key-value pair ... - }, + } }, ... ], - "fee" : n, (numeric, optional) The transaction fee paid if all UTXOs slots in the PSBT have been filled. + "fee" : n (numeric, optional) The transaction fee paid if all UTXOs slots in the PSBT have been filled. } Examples: diff --git a/decoderawtransaction b/decoderawtransaction index 607c3dd..7c70099 100644 --- a/decoderawtransaction +++ b/decoderawtransaction @@ -14,45 +14,45 @@ Arguments: Result: { (json object) "txid" : "hex", (string) The transaction id "hash" : "hex", (string) The transaction hash (differs from txid for witness transactions) "size" : n, (numeric) The transaction size "vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions) "weight" : n, (numeric) The transaction's weight (between vsize*4 - 3 and vsize*4) "version" : n, (numeric) The version "locktime" : xxx, (numeric) The lock time "vin" : [ (json array) { (json object) "txid" : "hex", (string) The transaction id "vout" : n, (numeric) The output number "scriptSig" : { (json object) The script "asm" : "str", (string) asm - "hex" : "hex", (string) hex + "hex" : "hex" (string) hex }, "txinwitness" : [ (json array) "hex", (string) hex-encoded witness data (if any) ... ], - "sequence" : n, (numeric) The script sequence number + "sequence" : n (numeric) The script sequence number }, ... ], "vout" : [ (json array) { (json object) "value" : n, (numeric) The value in BTC "n" : n, (numeric) index "scriptPubKey" : { (json object) "asm" : "str", (string) the asm "hex" : "hex", (string) the hex "reqSigs" : n, (numeric) The required sigs "type" : "str", (string) The type, eg 'pubkeyhash' "addresses" : [ (json array) "str", (string) bitcoin address ... - ], - }, + ] + } }, ... - ], + ] } Examples: diff --git a/decodescript b/decodescript index 11044ea..d2d1618 100644 --- a/decodescript +++ b/decodescript @@ -8,24 +8,24 @@ Arguments: Result: { (json object) "asm" : "str", (string) Script public key "type" : "str", (string) The output type (e.g. nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_unknown) "reqSigs" : n, (numeric) The required signatures "addresses" : [ (json array) "str", (string) bitcoin address ... ], "p2sh" : "str", (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH) "segwit" : { (json object) Result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness) "asm" : "str", (string) String representation of the script public key "hex" : "hex", (string) Hex string of the script public key "type" : "str", (string) The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash) "reqSigs" : n, (numeric) The required signatures (always 1) "addresses" : [ (json array) (always length 1) "str", (string) segwit address ... ], - "p2sh-segwit" : "str", (string) address of the P2SH script wrapping this witness redeem script - }, + "p2sh-segwit" : "str" (string) address of the P2SH script wrapping this witness redeem script + } } Examples: diff --git a/dumptxoutset b/dumptxoutset index de6052e..0d22c4b 100644 --- a/dumptxoutset +++ b/dumptxoutset @@ -9,9 +9,9 @@ Arguments: Result: { (json object) "coins_written" : n, (numeric) the number of coins written in the snapshot "base_hash" : "hex", (string) the hash of the base of the snapshot "base_height" : n, (numeric) the height of the base of the snapshot - "path" : "str", (string) the absolute path that the snapshot was written to + "path" : "str" (string) the absolute path that the snapshot was written to } Examples: diff --git a/dumpwallet b/dumpwallet index 6b8bd4a..93dda41 100644 --- a/dumpwallet +++ b/dumpwallet @@ -10,7 +10,7 @@ Arguments: Result: { (json object) - "filename" : "str", (string) The filename with full absolute path + "filename" : "str" (string) The filename with full absolute path } Examples: diff --git a/estimaterawfee b/estimaterawfee index 59b4f17..7e7392d 100644 --- a/estimaterawfee +++ b/estimaterawfee @@ -19,31 +19,31 @@ Arguments: Result: { (json object) Results are returned for any horizon which tracks blocks up to the confirmation target "short" : { (json object, optional) estimate for short time horizon "feerate" : n, (numeric, optional) estimate fee rate in BTC/kB "decay" : n, (numeric) exponential decay (per block) for historical moving average of confirmation data "scale" : n, (numeric) The resolution of confirmation targets at this time horizon "pass" : { (json object, optional) information about the lowest range of feerates to succeed in meeting the threshold "startrange" : n, (numeric) start of feerate range "endrange" : n, (numeric) end of feerate range "withintarget" : n, (numeric) number of txs over history horizon in the feerate range that were confirmed within target "totalconfirmed" : n, (numeric) number of txs over history horizon in the feerate range that were confirmed at any point "inmempool" : n, (numeric) current number of txs in mempool in the feerate range unconfirmed for at least target blocks - "leftmempool" : n, (numeric) number of txs over history horizon in the feerate range that left mempool unconfirmed after target + "leftmempool" : n (numeric) number of txs over history horizon in the feerate range that left mempool unconfirmed after target }, "fail" : { (json object, optional) information about the highest range of feerates to fail to meet the threshold - ... + .. }, "errors" : [ (json array, optional) Errors encountered during processing "str", (string) ... - ], + ] }, "medium" : { (json object, optional) estimate for medium time horizon - ... + .. }, "long" : { (json object, optional) estimate for long time horizon - ... - }, + .. + } } Examples: diff --git a/estimatesmartfee b/estimatesmartfee index d182fd5..1899424 100644 --- a/estimatesmartfee +++ b/estimatesmartfee @@ -20,13 +20,13 @@ Arguments: Result: { (json object) "feerate" : n, (numeric, optional) estimate fee rate in BTC/kB (only present if no errors were encountered) "errors" : [ (json array) Errors encountered during processing "str", (string) error ... ], - "blocks" : n, (numeric) block number where estimate was found + "blocks" : n (numeric) block number where estimate was found The request target will be clamped between 2 and the highest target fee estimation is able to return based on how long it has been running. An error is returned if not enough transactions and blocks have been observed to make an estimate for any number of blocks. } diff --git a/finalizepsbt b/finalizepsbt index d770129..3d7e722 100644 --- a/finalizepsbt +++ b/finalizepsbt @@ -12,8 +12,8 @@ Arguments: Result: { (json object) "psbt" : "str", (string) The base64-encoded partially signed transaction if not extracted "hex" : "hex", (string) The hex-encoded network transaction if extracted - "complete" : true|false, (boolean) If the transaction has a complete set of signatures + "complete" : true|false (boolean) If the transaction has a complete set of signatures } Examples: diff --git a/fundrawtransaction b/fundrawtransaction index ecb91d8..e034463 100644 --- a/fundrawtransaction +++ b/fundrawtransaction @@ -49,8 +49,8 @@ Arguments: Result: { (json object) "hex" : "hex", (string) The resulting raw transaction (hex-encoded string) "fee" : n, (numeric) Fee in BTC the resulting transaction pays - "changepos" : n, (numeric) The position of the added change output, or -1 + "changepos" : n (numeric) The position of the added change output, or -1 } Examples: diff --git a/getaddednodeinfo b/getaddednodeinfo index 144c7db..96e6d64 100644 --- a/getaddednodeinfo +++ b/getaddednodeinfo @@ -9,15 +9,15 @@ Arguments: Result: [ (json array) { (json object) "addednode" : "str", (string) The node IP address or name (as provided to addnode) "connected" : true|false, (boolean) If connected "addresses" : [ (json array) Only when connected = true { (json object) "address" : "str", (string) The bitcoin server IP and port we're connected to - "connected" : "str", (string) connection, inbound or outbound + "connected" : "str" (string) connection, inbound or outbound }, ... - ], + ] }, ... ] diff --git a/getaddressesbylabel b/getaddressesbylabel index 51c3d25..89b4abb 100644 --- a/getaddressesbylabel +++ b/getaddressesbylabel @@ -8,7 +8,7 @@ Arguments: Result: { (json object) json object with addresses as keys "address" : { (json object) json object with information about address - "purpose" : "str", (string) Purpose of address ("send" for sending address, "receive" for receiving address) + "purpose" : "str" (string) Purpose of address ("send" for sending address, "receive" for receiving address) }, ... } diff --git a/getaddressinfo b/getaddressinfo index 850e571..802cebe 100644 --- a/getaddressinfo +++ b/getaddressinfo @@ -9,46 +9,46 @@ Arguments: Result: { (json object) "address" : "str", (string) The bitcoin address validated. "scriptPubKey" : "hex", (string) The hex-encoded scriptPubKey generated by the address. "ismine" : true|false, (boolean) If the address is yours. "iswatchonly" : true|false, (boolean) If the address is watchonly. "solvable" : true|false, (boolean) If we know how to spend coins sent to this address, ignoring the possible lack of private keys. "desc" : "str", (string, optional) A descriptor for spending coins sent to this address (only when solvable). "isscript" : true|false, (boolean) If the key is a script. "ischange" : true|false, (boolean) If the address was used for change output. "iswitness" : true|false, (boolean) If the address is a witness address. "witness_version" : n, (numeric, optional) The version number of the witness program. "witness_program" : "hex", (string, optional) The hex value of the witness program. "script" : "str", (string, optional) The output script type. Only if isscript is true and the redeemscript is known. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash, witness_unknown. "hex" : "hex", (string, optional) The redeemscript for the p2sh address. "pubkeys" : [ (json array, optional) Array of pubkeys associated with the known redeemscript (only if script is multisig). "str", (string) ... ], "sigsrequired" : n, (numeric, optional) The number of signatures required to spend multisig output (only if script is multisig). "pubkey" : "hex", (string, optional) The hex value of the raw public key for single-key addresses (possibly embedded in P2SH or P2WSH). "embedded" : { (json object, optional) Information about the address embedded in P2SH or P2WSH, if relevant and known. - ... Includes all + .. Includes all getaddressinfo output fields for the embedded address, excluding metadata (timestamp, hdkeypath, hdseedid) and relation to the wallet (ismine, iswatchonly). }, "iscompressed" : true|false, (boolean, optional) If the pubkey is compressed. "label" : "str", (string) DEPRECATED. The label associated with the address. Defaults to "". Replaced by the labels array below. "timestamp" : xxx, (numeric, optional) The creation time of the key, if available, expressed in UNIX epoch time. "hdkeypath" : "str", (string, optional) The HD keypath, if the key is HD and available. "hdseedid" : "hex", (string, optional) The Hash160 of the HD seed. "hdmasterfingerprint" : "hex", (string, optional) The fingerprint of the master key. "labels" : [ (json array) Array of labels associated with the address. Currently limited to one label but returned as an array to keep the API stable if multiple labels are enabled in the future. "str", (string) The label name. Defaults to "". { (json object) label data, DEPRECATED, will be removed in 0.21. To re-enable, launch bitcoind with `-deprecatedrpc=labelspurpose` "name" : "str", (string) The label name. Defaults to "". - "purpose" : "str", (string) The purpose of the associated address (send or receive). + "purpose" : "str" (string) The purpose of the associated address (send or receive). }, ... - ], + ] } Examples: diff --git a/getbalances b/getbalances index 171a471..a50ce7d 100644 --- a/getbalances +++ b/getbalances @@ -4,16 +4,16 @@ Returns an object with all balances in BTC. Result: { (json object) "mine" : { (json object) balances from outputs that the wallet can sign "trusted" : n, (numeric) trusted balance (outputs created by the wallet or confirmed outputs) "untrusted_pending" : n, (numeric) untrusted pending balance (outputs created by others that are in the mempool) "immature" : n, (numeric) balance from immature coinbase outputs - "used" : n, (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating) + "used" : n (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating) }, "watchonly" : { (json object) watchonly balances (not present if wallet does not watch anything) "trusted" : n, (numeric) trusted balance (outputs created by the wallet or confirmed outputs) "untrusted_pending" : n, (numeric) untrusted pending balance (outputs created by others that are in the mempool) - "immature" : n, (numeric) balance from immature coinbase outputs - }, + "immature" : n (numeric) balance from immature coinbase outputs + } } Examples: diff --git a/getblock b/getblock index 69b05bf..3aeb9f8 100644 --- a/getblock +++ b/getblock @@ -14,39 +14,39 @@ Result (for verbosity = 0): Result (for verbosity = 1): { (json object) "hash" : "hex", (string) the block hash (same as provided) "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain "size" : n, (numeric) The block size "strippedsize" : n, (numeric) The block size excluding witness data "weight" : n, (numeric) The block weight as defined in BIP 141 "height" : n, (numeric) The block height or index "version" : n, (numeric) The block version "versionHex" : "hex", (string) The block version formatted in hexadecimal "merkleroot" : "hex", (string) The merkle root "tx" : [ (json array) The transaction ids "hex", (string) The transaction id ... ], "time" : xxx, (numeric) The block time expressed in UNIX epoch time "mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time "nonce" : n, (numeric) The nonce "bits" : "hex", (string) The bits "difficulty" : n, (numeric) The difficulty "chainwork" : "hex", (string) Expected number of hashes required to produce the chain up to this block (in hex) "nTx" : n, (numeric) The number of transactions in the block "previousblockhash" : "hex", (string) The hash of the previous block - "nextblockhash" : "hex", (string) The hash of the next block + "nextblockhash" : "hex" (string) The hash of the next block } Result (for verbosity = 2): { (json object) ... Same output as verbosity = 1 "tx" : [ (json array) { (json object) - ... The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result + .. The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result }, ... ], - ... Same output as verbosity = 1 + .. Same output as verbosity = 1 } Examples: diff --git a/getblockchaininfo b/getblockchaininfo index d2d6764..4bc841e 100644 --- a/getblockchaininfo +++ b/getblockchaininfo @@ -4,42 +4,42 @@ Returns an object containing various state info regarding blockchain processing. Result: { (json object) "chain" : "str", (string) current network name (main, test, regtest) "blocks" : n, (numeric) the height of the most-work fully-validated chain. The genesis block has height 0 "headers" : n, (numeric) the current number of headers we have validated "bestblockhash" : "str", (string) the hash of the currently best block "difficulty" : n, (numeric) the current difficulty "mediantime" : n, (numeric) median time for the current best block "verificationprogress" : n, (numeric) estimate of verification progress [0..1] "initialblockdownload" : true|false, (boolean) (debug information) estimate of whether this node is in Initial Block Download mode "chainwork" : "hex", (string) total amount of work in active chain, in hexadecimal "size_on_disk" : n, (numeric) the estimated size of the block and undo files on disk "pruned" : true|false, (boolean) if the blocks are subject to pruning "pruneheight" : n, (numeric) lowest-height complete block stored (only present if pruning is enabled) "automatic_pruning" : true|false, (boolean) whether automatic pruning is enabled (only present if pruning is enabled) "prune_target_size" : n, (numeric) the target size used by pruning (only present if automatic pruning is enabled) "softforks" : { (json object) status of softforks "xxxx" : { (json object) name of the softfork "type" : "str", (string) one of "buried", "bip9" "bip9" : { (json object) status of bip9 softforks (only for "bip9" type) "status" : "str", (string) one of "defined", "started", "locked_in", "active", "failed" "bit" : n, (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status) "start_time" : xxx, (numeric) the minimum median time past of a block at which the bit gains its meaning "timeout" : xxx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in "since" : n, (numeric) height of the first block to which the status applies "statistics" : { (json object) numeric statistics about BIP9 signalling for a softfork (only for "started" status) "period" : n, (numeric) the length in blocks of the BIP9 signalling period "threshold" : n, (numeric) the number of blocks with the version bit set required to activate the feature "elapsed" : n, (numeric) the number of blocks elapsed since the beginning of the current period "count" : n, (numeric) the number of blocks with the version bit set in the current period - "possible" : true|false, (boolean) returns false if there are not enough blocks left in this period to pass activation threshold - }, + "possible" : true|false (boolean) returns false if there are not enough blocks left in this period to pass activation threshold + } }, "height" : n, (numeric) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status) - "active" : true|false, (boolean) true if the rules are enforced for the mempool and the next block + "active" : true|false (boolean) true if the rules are enforced for the mempool and the next block }, ... }, - "warnings" : "str", (string) any network and blockchain warnings + "warnings" : "str" (string) any network and blockchain warnings } Examples: diff --git a/getblockfilter b/getblockfilter index 541b5d6..75c3f03 100644 --- a/getblockfilter +++ b/getblockfilter @@ -9,7 +9,7 @@ Arguments: Result: { (json object) "filter" : "hex", (string) the hex-encoded filter data - "header" : "hex", (string) the hex-encoded filter header + "header" : "hex" (string) the hex-encoded filter header } Examples: diff --git a/getblockheader b/getblockheader index f06e705..51d93f8 100644 --- a/getblockheader +++ b/getblockheader @@ -10,20 +10,20 @@ Arguments: Result (for verbose = true): { (json object) "hash" : "hex", (string) the block hash (same as provided) "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain "height" : n, (numeric) The block height or index "version" : n, (numeric) The block version "versionHex" : "hex", (string) The block version formatted in hexadecimal "merkleroot" : "hex", (string) The merkle root "time" : xxx, (numeric) The block time expressed in UNIX epoch time "mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time "nonce" : n, (numeric) The nonce "bits" : "hex", (string) The bits "difficulty" : n, (numeric) The difficulty "chainwork" : "hex", (string) Expected number of hashes required to produce the current chain "nTx" : n, (numeric) The number of transactions in the block "previousblockhash" : "hex", (string) The hash of the previous block - "nextblockhash" : "hex", (string) The hash of the next block + "nextblockhash" : "hex" (string) The hash of the next block } Result (for verbose=false): diff --git a/getblockstats b/getblockstats index cff3f22..f90a23b 100644 --- a/getblockstats +++ b/getblockstats @@ -15,40 +15,40 @@ Arguments: Result: { (json object) "avgfee" : n, (numeric) Average fee in the block "avgfeerate" : n, (numeric) Average feerate (in satoshis per virtual byte) "avgtxsize" : n, (numeric) Average transaction size "blockhash" : "hex", (string) The block hash (to check for potential reorgs) "feerate_percentiles" : [ (json array) Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte) n, (numeric) The 10th percentile feerate n, (numeric) The 25th percentile feerate n, (numeric) The 50th percentile feerate n, (numeric) The 75th percentile feerate - n, (numeric) The 90th percentile feerate + n (numeric) The 90th percentile feerate ], "height" : n, (numeric) The height of the block "ins" : n, (numeric) The number of inputs (excluding coinbase) "maxfee" : n, (numeric) Maximum fee in the block "maxfeerate" : n, (numeric) Maximum feerate (in satoshis per virtual byte) "maxtxsize" : n, (numeric) Maximum transaction size "medianfee" : n, (numeric) Truncated median fee in the block "mediantime" : n, (numeric) The block median time past "mediantxsize" : n, (numeric) Truncated median transaction size "minfee" : n, (numeric) Minimum fee in the block "minfeerate" : n, (numeric) Minimum feerate (in satoshis per virtual byte) "mintxsize" : n, (numeric) Minimum transaction size "outs" : n, (numeric) The number of outputs "subsidy" : n, (numeric) The block subsidy "swtotal_size" : n, (numeric) Total size of all segwit transactions "swtotal_weight" : n, (numeric) Total weight of all segwit transactions divided by segwit scale factor (4) "swtxs" : n, (numeric) The number of segwit transactions "time" : n, (numeric) The block time "total_out" : n, (numeric) Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee]) "total_size" : n, (numeric) Total size of all non-coinbase transactions "total_weight" : n, (numeric) Total weight of all non-coinbase transactions divided by segwit scale factor (4) "totalfee" : n, (numeric) The fee total "txs" : n, (numeric) The number of transactions (excluding coinbase) "utxo_increase" : n, (numeric) The increase/decrease in the number of unspent outputs - "utxo_size_inc" : n, (numeric) The increase/decrease in size for the utxo index (not discounting op_return and similar) + "utxo_size_inc" : n (numeric) The increase/decrease in size for the utxo index (not discounting op_return and similar) } Examples: diff --git a/getblocktemplate b/getblocktemplate index 73a1fab..bd06b2b 100644 --- a/getblocktemplate +++ b/getblocktemplate @@ -25,51 +25,51 @@ Arguments: Result: { (json object) "version" : n, (numeric) The preferred block version "rules" : [ (json array) specific block rules that are to be enforced "str", (string) rulename ... ], "vbavailable" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments "rulename" : n, (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule ... }, "vbrequired" : n, (numeric) bit mask of versionbits the server requires set in submissions "previousblockhash" : "str", (string) The hash of current highest block "" : [ (json array) contents of non-coinbase transactions that should be included in the next block { (json object) "data" : "hex", (string) transaction data encoded in hexadecimal (byte-for-byte) "txid" : "hex", (string) transaction id encoded in little-endian hexadecimal "hash" : "hex", (string) hash encoded in little-endian hexadecimal (including witness data) "depends" : [ (json array) array of numbers n, (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is ... ], "fee" : n, (numeric) difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one "sigops" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero - "weight" : n, (numeric) total transaction weight, as counted for purposes of block limits + "weight" : n (numeric) total transaction weight, as counted for purposes of block limits }, ... ], "coinbaseaux" : { (json object) data that should be included in the coinbase's scriptSig content - ... + .. }, "coinbasevalue" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis) "coinbasetxn" : { (json object) information for coinbase transaction - ... + .. }, "target" : "str", (string) The hash target "mintime" : xxx, (numeric) The minimum timestamp appropriate for the next block time, expressed in UNIX epoch time "mutable" : [ (json array) list of ways the block template may be changed "str", (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock' ... ], "noncerange" : "hex", (string) A range of valid nonces "sigoplimit" : n, (numeric) limit of sigops in blocks "sizelimit" : n, (numeric) limit of block size "weightlimit" : n, (numeric) limit of block weight "curtime" : xxx, (numeric) current timestamp in UNIX epoch time "bits" : "str", (string) compressed target of next block - "height" : n, (numeric) The height of the next block + "height" : n (numeric) The height of the next block } Examples: diff --git a/getchaintips b/getchaintips index f7d160c..2c60fb8 100644 --- a/getchaintips +++ b/getchaintips @@ -4,16 +4,16 @@ Return information about all known tips in the block tree, including the main ch Result: [ (json array) { (json object) "height" : n, (numeric) height of the chain tip "hash" : "hex", (string) block hash of the tip "branchlen" : n, (numeric) zero for main chain, otherwise length of branch connecting the tip to the main chain - "status" : "str", (string) status of the chain, "active" for the main chain + "status" : "str" (string) status of the chain, "active" for the main chain Possible values for status: 1. "invalid" This branch contains at least one invalid block 2. "headers-only" Not all blocks for this branch are available, but the headers are valid 3. "valid-headers" All blocks are available for this branch, but they were never fully validated 4. "valid-fork" This branch is not part of the active chain, but is fully validated 5. "active" This is the tip of the active main chain, which is certainly valid }, ... ] diff --git a/getchaintxstats b/getchaintxstats index 5730b6d..64da9ab 100644 --- a/getchaintxstats +++ b/getchaintxstats @@ -9,13 +9,13 @@ Arguments: Result: { (json object) "time" : xxx, (numeric) The timestamp for the final block in the window, expressed in UNIX epoch time "txcount" : n, (numeric) The total number of transactions in the chain up to that point "window_final_block_hash" : "hex", (string) The hash of the final block in the window "window_final_block_height" : n, (numeric) The height of the final block in the window. "window_block_count" : n, (numeric) Size of the window in number of blocks "window_tx_count" : n, (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0 "window_interval" : n, (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0 - "txrate" : n, (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0 + "txrate" : n (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0 } Examples: diff --git a/getdescriptorinfo b/getdescriptorinfo index 7e3722b..d04f048 100644 --- a/getdescriptorinfo +++ b/getdescriptorinfo @@ -8,10 +8,10 @@ Arguments: Result: { (json object) "descriptor" : "str", (string) The descriptor in canonical form, without private keys "checksum" : "str", (string) The checksum for the input descriptor "isrange" : true|false, (boolean) Whether the descriptor is ranged "issolvable" : true|false, (boolean) Whether the descriptor is solvable - "hasprivatekeys" : true|false, (boolean) Whether the input descriptor contained at least one private key + "hasprivatekeys" : true|false (boolean) Whether the input descriptor contained at least one private key } Examples: diff --git a/getmemoryinfo b/getmemoryinfo index b66b7c4..4714343 100644 --- a/getmemoryinfo +++ b/getmemoryinfo @@ -9,13 +9,13 @@ Arguments: Result (mode "stats"): { (json object) "locked" : { (json object) Information about locked memory manager "used" : n, (numeric) Number of bytes used "free" : n, (numeric) Number of bytes available in current arenas "total" : n, (numeric) Total number of bytes managed "locked" : n, (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. "chunks_used" : n, (numeric) Number allocated chunks - "chunks_free" : n, (numeric) Number unused chunks - }, + "chunks_free" : n (numeric) Number unused chunks + } } Result (mode "mallocinfo"): diff --git a/getmempoolancestors b/getmempoolancestors index 005c8b3..7d52fb9 100644 --- a/getmempoolancestors +++ b/getmempoolancestors @@ -15,34 +15,34 @@ Result (for verbose = false): Result (for verbose = true): { (json object) "vsize" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. "size" : n, (numeric) (DEPRECATED) same as vsize. Only returned if bitcoind is started with -deprecatedrpc=size size will be completely removed in v0.20. "weight" : n, (numeric) transaction weight as defined in BIP 141. "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) "time" : xxx, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT "height" : n, (numeric) block height when transaction entered pool "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) "wtxid" : "hex", (string) hash of serialized transaction, including witness data "fees" : { (json object) "base" : n, (numeric) transaction fee in BTC "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC - "descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC + "descendant" : n (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC }, "depends" : [ (json array) unconfirmed transactions used as inputs for this transaction "hex", (string) parent transaction id ... ], "spentby" : [ (json array) unconfirmed transactions spending outputs from this transaction "hex", (string) child transaction id ... ], "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) ... } diff --git a/getmempooldescendants b/getmempooldescendants index 77b25e0..3106229 100644 --- a/getmempooldescendants +++ b/getmempooldescendants @@ -15,38 +15,38 @@ Result (for verbose = false): Result (for verbose = true): { (json object) "transactionid" : { (json object) "vsize" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. "size" : n, (numeric) (DEPRECATED) same as vsize. Only returned if bitcoind is started with -deprecatedrpc=size size will be completely removed in v0.20. "weight" : n, (numeric) transaction weight as defined in BIP 141. "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) "time" : xxx, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT "height" : n, (numeric) block height when transaction entered pool "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) "wtxid" : "hex", (string) hash of serialized transaction, including witness data "fees" : { (json object) "base" : n, (numeric) transaction fee in BTC "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC - "descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC + "descendant" : n (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC }, "depends" : [ (json array) unconfirmed transactions used as inputs for this transaction "hex", (string) parent transaction id ... ], "spentby" : [ (json array) unconfirmed transactions spending outputs from this transaction "hex", (string) child transaction id ... ], "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) ... - }, + } } Examples: diff --git a/getmempoolentry b/getmempoolentry index 18d2d18..f5877ce 100644 --- a/getmempoolentry +++ b/getmempoolentry @@ -8,34 +8,34 @@ Arguments: Result: { (json object) "vsize" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. "size" : n, (numeric) (DEPRECATED) same as vsize. Only returned if bitcoind is started with -deprecatedrpc=size size will be completely removed in v0.20. "weight" : n, (numeric) transaction weight as defined in BIP 141. "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) "time" : xxx, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT "height" : n, (numeric) block height when transaction entered pool "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) "wtxid" : "hex", (string) hash of serialized transaction, including witness data "fees" : { (json object) "base" : n, (numeric) transaction fee in BTC "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC - "descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC + "descendant" : n (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC }, "depends" : [ (json array) unconfirmed transactions used as inputs for this transaction "hex", (string) parent transaction id ... ], "spentby" : [ (json array) unconfirmed transactions spending outputs from this transaction "hex", (string) child transaction id ... ], "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) ... } diff --git a/getmempoolinfo b/getmempoolinfo index 8cf6000..673f34b 100644 --- a/getmempoolinfo +++ b/getmempoolinfo @@ -5,12 +5,12 @@ Returns details on the active state of the TX memory pool. Result: { (json object) "loaded" : true|false, (boolean) True if the mempool is fully loaded "size" : n, (numeric) Current tx count "bytes" : n, (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted "usage" : n, (numeric) Total memory usage for the mempool "maxmempool" : n, (numeric) Maximum memory usage for the mempool "mempoolminfee" : n, (numeric) Minimum fee rate in BTC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee - "minrelaytxfee" : n, (numeric) Current minimum relay fee for transactions + "minrelaytxfee" : n (numeric) Current minimum relay fee for transactions } Examples: diff --git a/getmininginfo b/getmininginfo index 6ba4d2d..9311905 100644 --- a/getmininginfo +++ b/getmininginfo @@ -4,13 +4,13 @@ Returns a json object containing mining-related information. Result: { (json object) "blocks" : n, (numeric) The current block "currentblockweight" : n, (numeric, optional) The block weight of the last assembled block (only present if a block was ever assembled) "currentblocktx" : n, (numeric, optional) The number of block transactions of the last assembled block (only present if a block was ever assembled) "difficulty" : n, (numeric) The current difficulty "networkhashps" : n, (numeric) The network hashes per second "pooledtx" : n, (numeric) The size of the mempool "chain" : "str", (string) current network name (main, test, regtest) - "warnings" : "str", (string) any network and blockchain warnings + "warnings" : "str" (string) any network and blockchain warnings } Examples: diff --git a/getnettotals b/getnettotals index ca8497c..c7aac0d 100644 --- a/getnettotals +++ b/getnettotals @@ -6,16 +6,16 @@ and current time. Result: { (json object) "totalbytesrecv" : n, (numeric) Total bytes received "totalbytessent" : n, (numeric) Total bytes sent "timemillis" : xxx, (numeric) Current UNIX time in milliseconds "uploadtarget" : { (json object) "timeframe" : n, (numeric) Length of the measuring timeframe in seconds "target" : n, (numeric) Target in bytes "target_reached" : true|false, (boolean) True if target is reached "serve_historical_blocks" : true|false, (boolean) True if serving historical blocks "bytes_left_in_cycle" : n, (numeric) Bytes left in current time cycle - "time_left_in_cycle" : n, (numeric) Seconds left in current time cycle - }, + "time_left_in_cycle" : n (numeric) Seconds left in current time cycle + } } Examples: diff --git a/getnetworkinfo b/getnetworkinfo index 7b3388d..6f0923c 100644 --- a/getnetworkinfo +++ b/getnetworkinfo @@ -4,38 +4,38 @@ Returns an object containing various state info regarding P2P networking. Result: { (json object) "version" : n, (numeric) the server version "subversion" : "str", (string) the server subversion string "protocolversion" : n, (numeric) the protocol version "localservices" : "hex", (string) the services we offer to the network "localservicesnames" : [ (json array) the services we offer to the network, in human-readable form "str", (string) the service name ... ], "localrelay" : true|false, (boolean) true if transaction relay is requested from peers "timeoffset" : n, (numeric) the time offset "connections" : n, (numeric) the number of connections "networkactive" : true|false, (boolean) whether p2p networking is enabled "networks" : [ (json array) information per network { (json object) "name" : "str", (string) network (ipv4, ipv6 or onion) "limited" : true|false, (boolean) is the network limited using -onlynet? "reachable" : true|false, (boolean) is the network reachable? "proxy" : "str", (string) ("host:port") the proxy that is used for this network, or empty if none - "proxy_randomize_credentials" : true|false, (boolean) Whether randomized credentials are used + "proxy_randomize_credentials" : true|false (boolean) Whether randomized credentials are used }, ... ], "relayfee" : n, (numeric) minimum relay fee for transactions in BTC/kB "incrementalfee" : n, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in BTC/kB "localaddresses" : [ (json array) list of local addresses { (json object) "address" : "str", (string) network address "port" : n, (numeric) network port - "score" : n, (numeric) relative score + "score" : n (numeric) relative score }, ... ], - "warnings" : "str", (string) any network and blockchain warnings + "warnings" : "str" (string) any network and blockchain warnings } Examples: diff --git a/getnodeaddresses b/getnodeaddresses index 621c0c5..817ee0c 100644 --- a/getnodeaddresses +++ b/getnodeaddresses @@ -8,10 +8,10 @@ Arguments: Result: [ (json array) { (json object) "time" : xxx, (numeric) The UNIX epoch time of when the node was last seen "services" : n, (numeric) The services offered "address" : "str", (string) The address of the node - "port" : n, (numeric) The port of the node + "port" : n (numeric) The port of the node }, ... ] diff --git a/getpeerinfo b/getpeerinfo index 247f098..a0306af 100644 --- a/getpeerinfo +++ b/getpeerinfo @@ -5,52 +5,52 @@ Returns data about each connected network node as a json array of objects. Result: [ (json array) { (json object) "id" : n, (numeric) Peer index "addr" : "str", (string) (host:port) The IP address and port of the peer "addrbind" : "str", (string) (ip:port) Bind address of the connection to the peer "addrlocal" : "str", (string) (ip:port) Local address as reported by the peer "mapped_as" : n, (numeric) The AS in the BGP route to the peer used for diversifying peer selection (only available if the asmap config flag is set) "services" : "hex", (string) The services offered "servicesnames" : [ (json array) the services offered, in human-readable form "str", (string) the service name if it is recognised ... ], "relaytxes" : true|false, (boolean) Whether peer has asked us to relay transactions to it "lastsend" : xxx, (numeric) The UNIX epoch time of the last send "lastrecv" : xxx, (numeric) The UNIX epoch time of the last receive "bytessent" : n, (numeric) The total bytes sent "bytesrecv" : n, (numeric) The total bytes received "conntime" : xxx, (numeric) The UNIX epoch time of the connection "timeoffset" : n, (numeric) The time offset in seconds "pingtime" : n, (numeric) ping time (if available) "minping" : n, (numeric) minimum observed ping time (if any at all) "pingwait" : n, (numeric) ping wait (if non-zero) "version" : n, (numeric) The peer version, such as 70001 "subver" : "str", (string) The string version "inbound" : true|false, (boolean) Inbound (true) or Outbound (false) "addnode" : true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection "startingheight" : n, (numeric) The starting height (block) of the peer "banscore" : n, (numeric) The ban score "synced_headers" : n, (numeric) The last header we have in common with this peer "synced</details>
-
MarcoFalke commented at 8:59 PM on March 28, 2020: member
- sidhujag referenced this in commit 7e681a5f06 on Mar 29, 2020
- Fabcien referenced this in commit c077bd1fcf on Jan 13, 2021
- DrahtBot locked this on Feb 15, 2022