aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
AgeCommit message (Collapse)Author
2021-08-05Add logging and addr rate limiting statisticsPieter Wuille
Includes logging improvements by Vasil Dimov and John Newbery. Github-Pull: #22387 Rebased-From: f424d601e1b6870e20bc60f5ccba36d2e210377b
2020-12-26[doc] Add permissions to the getpeerinfo help.Amiti Uttarwar
This field was already being returned, but the RPCHelpMan did not indicate this. So, this PR updates the help text to match. Github-Pull: #20756 Rebased-From: 667d203687708390bc0f43f2dd3f4ab427b88338
2020-11-09Merge #20120: net, rpc, test, bugfix: update GetNetworkName, ↵Wladimir J. van der Laan
GetNetworksInfo, regression tests 7b5bd3102e06f7ff34b5d0f1d45a005560f265a5 test: add getnetworkinfo network name regression tests (Jon Atack) 9a75e1e5697476058b56cd8014a36de31bfecd4c rpc: update GetNetworksInfo() to not return unsupported networks (Jon Atack) ba8997fb2eda73603ce457bfec668cb7e0acbc89 net: update GetNetworkName() with all enum Network cases (Jon Atack) Pull request description: Following up on the BIP155 addrv2 changes, and starting with 7be6ff6 in #19845, RPC getnetworkinfo began returning networks with empty names. <details><summary><code>getnetworkinfo</code> on current master</summary><p> ``` "networks": [ { "name": "ipv4", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "ipv6", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "onion", "limited": false, "reachable": true, "proxy": "127.0.0.1:9050", "proxy_randomize_credentials": true }, { "name": "", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false } ], ``` </p></details> <details><summary><code>getnetworkinfo</code> on this branch</summary><p> ``` "networks": [ { "name": "ipv4", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "ipv6", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "onion", "limited": false, "reachable": true, "proxy": "127.0.0.1:9050", "proxy_randomize_credentials": true } ], ``` </p></details> This patch: - updates `GetNetworkName()` to the current Network enum - updates `getNetworksInfo()` to ignore as-yet unsupported networks - adds regression tests ACKs for top commit: hebasto: re-ACK 7b5bd3102e06f7ff34b5d0f1d45a005560f265a5 vasild: ACK 7b5bd3102 Tree-SHA512: 8f12363eb430e6f45e59e3b1d69c2f2eb5ead254ce7a67547d116c3b70138d763157335a3c85b51f684a3b3b502c6aace4f6fa60ac3b988cf7a9475a7423c4d7
2020-10-15Merge #20090: [doc] Tiny followups to new getpeerinfo connection type fieldWladimir J. van der Laan
41dca087b73a3627107603694f5a982ea2a53189 [trivial] Extract connection type doc into file where it is used. (Amiti Uttarwar) 3069b56a456d98fca7c4a4ccd329581bd1f0b853 [doc] Improve help for getpeerinfo connection_type field. (Amiti Uttarwar) Pull request description: two commits addressing small followups from #19725 * first commit adds a clarification in the release notes that this field shouldn't be expected to be stable (suggested by sdaftuar in https://github.com/bitcoin/bitcoin/pull/19725#issuecomment-697421878) * second commit moves the `CONNECTION_TYPE_DOC` object out of the header file to reduce the size of the binary (suggested by MarcoFalke in https://github.com/bitcoin/bitcoin/pull/19725#discussion_r495467895, he tested and found a decrease of 10kB) ACKs for top commit: achow101: ACK 41dca087b73a3627107603694f5a982ea2a53189 laanwj: Code review ACK 41dca087b73a3627107603694f5a982ea2a53189 Tree-SHA512: a555df978b4341fbe05deeb40a8a655f0d3c5c1c0adcc1737fd2cf61b204a5a24a301ca0c2b5a3616554d4abf8c57074d22dbda5a50d8450bc22c57679424985
2020-10-15rpc: update GetNetworksInfo() to not return unsupported networksJon Atack
2020-10-15Merge #20002: net, rpc, cli: expose peer network in getpeerinfo; ↵Wladimir J. van der Laan
simplify/improve -netinfo 6272604bef3b409455b010d134b4b62c8f6ff49f refactor: enable -netinfo to add future networks (i2p, cjdns) (Jon Atack) 82fd40216c70037480150d2b62e2b58c57784546 refactor: promote some -netinfo localvars to class members (Jon Atack) 5133fab37e8679e1d0d08ead4f5cccf4979dc15b cli: simplify -netinfo using getpeerinfo network field (Jon Atack) 4938a109adf13f2c60a50f08d4cc9ddb8d7ded96 rpc, test: expose CNodeStats network in RPC getpeerinfo (Jon Atack) 6df7882029854f0427d84b22081018ae77e27e66 net: add peer network to CNodeStats (Jon Atack) Pull request description: This PR: - builds on #19991 and #19998 - exposes peer networks via a new getpeerinfo `network` field ("ipv4", "ipv6", or "onion"), and adds functional tests - updates -netinfo to use getpeerinfo `network` rather than detecting the peer networks client-side - refactors -netinfo to easily add future networks ACKs for top commit: laanwj: ACK 6272604bef3b409455b010d134b4b62c8f6ff49f Tree-SHA512: 28883487585135ceaaf84ce09131f2336e3193407f2e3df0960e3f4ac340f500ab94ffecb9d06a4c49bc05e3cca4f914ea4379860bea0bd5df2f834f74616015
2020-10-14RPC: getpeerinfo: Wrap long help line for bytesrecv_per_msgLuke Dashjr
2020-10-14RPC: getpeerinfo: Deprecate "whitelisted" field (replaced by "permissions")Luke Dashjr
2020-10-14rpc, test: expose CNodeStats network in RPC getpeerinfoJon Atack
2020-10-09[trivial] Extract connection type doc into file where it is used.Amiti Uttarwar
This slightly reduces the size of the binary.
2020-10-09[doc] Improve help for getpeerinfo connection_type field.Amiti Uttarwar
2020-09-26Merge #19725: [RPC] Add connection type to getpeerinfo, improve logsMarcoFalke
a512925e19a70d7f6b80ac530a169f45ffaafa1c [doc] Release notes (Amiti Uttarwar) 50f94b34a33c954f6e207f509c93d33267a5c3e2 [rpc] Deprecate getpeerinfo addnode field (Amiti Uttarwar) df091b9b509f0b10e4315c0bfa2da0cc0c31c22f [refactor] Rename test file to allow any getpeerinfo deprecations. (Amiti Uttarwar) 395acfa83a5436790c1a722a5609ac9d48df235f [rpc] Add connection type to getpeerinfo RPC, update tests (Amiti Uttarwar) 49c10a9ca40967d28ae16dfea9cccc6f3a6624a1 [log] Add connection type to log statement (Amiti Uttarwar) Pull request description: After #19316, we can more directly expose information about the connection type on the `getpeerinfo` RPC. Doing so also makes the existing addnode field redundant, so this PR begins the process of deprecating this field. This PR also includes one commit that improves a log message, as both use a shared function to return the connection type as a string. Suggested by sdaftuar- https://github.com/bitcoin/bitcoin/pull/19316#discussion_r468001604 & https://github.com/bitcoin/bitcoin/pull/19316#discussion_r468018093 ACKs for top commit: jnewbery: Code review ACK a512925e19a70d7f6b80ac530a169f45ffaafa1c. sipa: utACK a512925e19a70d7f6b80ac530a169f45ffaafa1c guggero: Tested and code review ACK a512925e. MarcoFalke: cr ACK a512925e19a70d7f6b80ac530a169f45ffaafa1c 🌇 promag: Code review ACK a512925e19a70d7f6b80ac530a169f45ffaafa1c. Tree-SHA512: 601a7a38aee235ee59aca690784f886dc2ae4e418b2e6422c4b58cd597376c00f74910f66920b08a08a0bec28bf8022e71a1435785ff6ba8a188954261aba78e
2020-09-22Assert that RPCArg names are equal to CRPCCommand ones (net, rpcwallet)MarcoFalke
2020-09-21[rpc] Deprecate getpeerinfo addnode fieldAmiti Uttarwar
This field is now redundant since the connection type field will indicate MANUAL for addnode connections.
2020-09-21[rpc] Add connection type to getpeerinfo RPC, update testsAmiti Uttarwar
2020-09-04Merge #19405: rpc, cli: add network in/out connections to `getnetworkinfo` ↵Wladimir J. van der Laan
and `-getinfo` 581b343d5bf517510ab0236583ca96628751177d Add in/out connections to cli -getinfo (Jon Atack) d9cc13e88d096c1a171159c01cbb96444f7f8d7f UNIX_EPOCH_TIME fixup in rpc getnettotals (Jon Atack) 1ab49b81cf32b6ef9e312a0a8ac45c68a3262f0d Add in/out connections to rpc getnetworkinfo (Jon Atack) Pull request description: This is basic info that is present in the GUI that I've been wishing to have exposed via the RPC and CLI without needing a bash workaround or script. For human users it would also be useful to have it in `-getinfo`. `bitcoin-cli getnetworkinfo` ``` "connections": 15, "connections_in": 6, "connections_out": 9, ``` `bitcoin-cli -getinfo` ``` "connections": { "in": 6, "out": 9, "total": 15 }, ``` Update the tests, RPC help, and release notes for the changes. Also fixup the `getnettotals` timemillis help while touching `rpc/net.cpp`. ----- Reviewers can manually test this PR by [building from source](https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests), launching bitcoind, and then running `bitcoin-cli -getinfo`, `bitcoin-cli getnetworkinfo`, `bitcoin-cli help getnetworkinfo`, and `bitcoin-cli help getnettotals` (for the UNIX epoch time change). ACKs for top commit: eriknylund: > tACK [581b343](https://github.com/bitcoin/bitcoin/commit/581b343d5bf517510ab0236583ca96628751177d) on master at [a0a422c](https://github.com/bitcoin/bitcoin/commit/a0a422c34cfd6514d0cc445bd784d3ee1a2d1749), ran unit & functional tests and and confirmed changes on an existing datadir ✌️ benthecarman: tACK `581b343` willcl-ark: tACK for 581b343d5bf517510ab0236583ca96628751177d, this time rebased onto master at 862fde88be706adb20a211178253636442c3ae00. shesek: tACK `581b343`. This provides what I needed, thanks! n-thumann: tACK 581b343 on master at a0a422c, ran unit & functional tests and and confirmed changes on an existing datadir ✌️ Tree-SHA512: 08dd3ac8fefae401bd8253ff3ac027603c528eeccba53cedcb127771316173a7052fce44af8fa33ac98ebc4cf2a2b11cdefd949995d55e9b9a5942b876d00dc5
2020-08-28Merge #19607: [p2p] Add Peer struct for per-peer data in net processingWladimir J. van der Laan
8e35bf59062b3a823182588e0bf809b3367c2be0 scripted-diff: rename misbehavior members (John Newbery) 1f96d2e673a78220eebf3bbd15b121c51c4cd97b [net processing] Move misbehavior tracking state to Peer (John Newbery) 7cd4159ac834432dadd60a5e8ee817f3cadbee55 [net processing] Add Peer (John Newbery) aba03359a6e62a376ae44914f609f82a1556fc89 [net processing] Remove CNodeState.name (John Newbery) Pull request description: We currently have two structures for per-peer data: - `CNode` in net, which should just contain connection layer data (eg socket, send/recv buffers, etc), but currently also contains some application layer data (eg tx/block inventory). - `CNodeState` in net processing, which contains p2p application layer data, but requires cs_main to be locked for access. This PR adds a third struct `Peer`, which is for p2p application layer data, and doesn't require cs_main. Eventually all application layer data from `CNode` should be moved to `Peer`, and any data that doesn't strictly require cs_main should be moved from `CNodeState` to `Peer` (probably all of `CNodeState` eventually). `Peer` objects are stored as shared pointers in a net processing global map `g_peer_map`, which is protected by `g_peer_mutex`. To use a `Peer` object, `g_peer_mutex` is locked, a copy of the shared pointer is taken, and the lock is released. Individual members of `Peer` are protected by different mutexes that guard related data. The lifetime of the `Peer` object is managed by the shared_ptr refcount. This PR adds the `Peer` object and moves the misbehaving data from `CNodeState` to `Peer`. This allows us to immediately remove 15 `LOCK(cs_main)` instances. For more motivation see #19398 ACKs for top commit: laanwj: Code review ACK 8e35bf59062b3a823182588e0bf809b3367c2be0 troygiorshev: reACK 8e35bf59062b3a823182588e0bf809b3367c2be0 via `git range-diff master 9510938 8e35bf5` theuni: ACK 8e35bf59062b3a823182588e0bf809b3367c2be0. jonatack: ACK 8e35bf59062b3a823182588e0bf809b3367c2be0 keeping in mind Cory's comment (https://github.com/bitcoin/bitcoin/pull/19607#discussion_r470173964) for the follow-up Tree-SHA512: ad84a92b78fb34c9f43813ca3dfbc7282c887d55300ea2ce0994d134da3e0c7dbc44d54380e00b13bb75a57c28857ac3236bea9135467075d78026767a19e4b1
2020-08-24UNIX_EPOCH_TIME fixup in rpc getnettotalsJon Atack
2020-08-24Add in/out connections to rpc getnetworkinfoJon Atack
2020-08-15rpc: expose nLastBlockTime/TXTime as getpeerinfo last_block/transactionJon Atack
2020-08-14Merge #19528: rpc: Assert that RPCArg names are equal to CRPCCommand ones (misc)MarcoFalke
fa77de2baa40ee828c850ef4068c76cc3619e87b rpc: Assert that RPCArg names are equal to CRPCCommand ones (misc) (MarcoFalke) fa50bdc755489b2e291ea5ba0e39e44a20c6c6de rpc: Limit echo to 10 args (MarcoFalke) fa89ca9b5bd334813fd7e7edb202c56b35076e8d refactor: Use C++11 range based for loops to simplify rpc code (MarcoFalke) fa459bdc87bbb050ca1c8d469023a96ed798540e rpc: Treat all args after a hidden arg as hidden as well (MarcoFalke) Pull request description: This is split out from #18531 to just touch the RPC methods in misc. Description from the main pr: ### Motivation RPCArg names in the rpc help are currently only used for documentation. However, in the future they could be used to teach the server the named arguments. Named arguments are currently registered by the `CRPCCommand`s and duplicate the RPCArg names from the documentation. This redundancy is fragile, and has lead to errors in the past (despite having linters to catch those kind of errors). See section "bugs found" for a list of bugs that have been found as a result of the changes here. ### Changes The changes here add an assert in the `CRPCCommand` constructor that the RPCArg names are identical to the ones in the `CRPCCommand`. ### Future work > Here or follow up, makes sense to also assert type of returned UniValue? Sure, but let's not get ahead of ourselves. I am going to submit any further works as follow-ups, including: * Removing the CRPCCommand arguments, now that they are asserted to be equal and thus redundant * Removing all python regex linters on the args, now that RPCMan can be used to generate any output, including the cli.cpp table * Auto-formatting and sanity checking the RPCExamples with RPCMan * Checking passed-in json in self-check. Removing redundant checks * Checking returned json against documentation to avoid regressions or false documentation * Compile the RPC documentation at compile-time to ensure it doesn't change at runtime and is completely static ### Bugs found * The assert identified issue #18607 * The changes itself fixed bug #19250 ACKs for top commit: laanwj: Code review ACK fa77de2baa40ee828c850ef4068c76cc3619e87b fjahr: tested ACK fa77de2baa40ee828c850ef4068c76cc3619e87b theStack: ACK https://github.com/bitcoin/bitcoin/pull/19528/commits/fa77de2baa40ee828c850ef4068c76cc3619e87b ryanofsky: Code review ACK fa77de2baa40ee828c850ef4068c76cc3619e87b. Pretty straightfoward changes Tree-SHA512: badae1606518c0b55ce2c0bb9025d14f05556532375eb20fd6f3bfadae1e5e6568860bff8599d037e655bf1d23f1f464ca17f4db10a6ab3d502b6e9e61c7b3d3
2020-08-12Merge #19696: rpc: Fix addnode remove command errorWladimir J. van der Laan
a51d0ad2de89b9757d158df95ddeba2bfcb23935 rpc: Improve addnode remove command error message (Fabian Jahr) Pull request description: The `addnode` RPC with the `remove` command parameter is used to remove a node from the "added nodes". It did not have test coverage and in case of failure to remove the node it responded with the confusing message "Error: Node has not been added.". This PR adds test coverage and introduces a new error code as well as changes the error message to something that makes sense. ACKs for top commit: laanwj: Code review ACK a51d0ad2de89b9757d158df95ddeba2bfcb23935 theStack: Tested ACK https://github.com/bitcoin/bitcoin/commit/a51d0ad2de Tree-SHA512: 033ef5de0d4d49d58ef4df3759b838c9d19ee9dfb0aff9f814a3a63d124ca231a442c930efa7d343fe1f65727c4b59fc23dd5e26fe6ea69f9e84fda48b5c5cc2
2020-08-12Merge #19658: [rpc] Allow RPC to fetch all addrman records and add records ↵Wladimir J. van der Laan
to addrman 37a480e0cd94895b6051abef12d984ff74bdc4a3 [net] Add addpeeraddress RPC method (John Newbery) ae8051bbd8377f2458ff1f167dc30c2d5f83e317 [test] Test that getnodeaddresses() can return all known addresses (John Newbery) f26502e9fc8a669b30717525597e3f468eaecf79 [addrman] Specify max addresses and pct when calling GetAddresses() (John Newbery) Pull request description: Currently addrman only allows a maximum of 1000 records or 23% of all records to be returned in a call to `GetAddr()`. Relax this limit and have the client specify the max records they want. For p2p, behaviour is unchanged (but the rate limiting is set inside net_processing, where it belongs). For RPC, `getnodeaddresses` can now return the complete addrman, which is helpful for testing and monitoring. Also add a test-only RPC `addpeeraddress`, which adds an IP address:port to addrman. This is helpful for testing (eg #18991). ACKs for top commit: naumenkogs: utACK 37a480e0cd94895b6051abef12d984ff74bdc4a3 laanwj: Code review and lightly manually tested ACK 37a480e0cd94895b6051abef12d984ff74bdc4a3 Tree-SHA512: f86dcd410aaebaf6e9ca18ce6f23556e5e4649c1325577213d873aa09967298e65ab2dc19a72670641ae92211a923afda1fe124a82e9d2c1cad73d478ef27fdc
2020-08-12scripted-diff: rename misbehavior membersJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/nMisbehavior/m_misbehavior_score/g' src/net_processing.cpp src/net_processing.h src/rpc/net.cpp src/qt/rpcconsole.cpp -END VERIFY SCRIPT-
2020-08-12[net] Add addpeeraddress RPC methodJohn Newbery
Allows addresses to be added to Address Manager for testing.
2020-08-12[addrman] Specify max addresses and pct when calling GetAddresses()John Newbery
CAddrMan.GetAddr() would previously limit the number and percentage of addresses returned (to ADDRMAN_GETADDR_MAX (1000) and ADDRMAN_GETADDR_MAX_PCT (23) respectively). Instead, make it the callers responsibility to specify the maximum addresses and percentage they want returned. For net_processing, the maximums are MAX_ADDR_TO_SEND (1000) and MAX_PCT_ADDR_TO_SEND (23). For rpc/net, the maximum is specified by the client.
2020-08-11rpc: Improve addnode remove command error messageFabian Jahr
This also adds test coverage for the remove command which was uncovered before.
2020-08-07[net/refactor] Add AddrFetch connections to ConnectionType enumAmiti Uttarwar
- AddrFetch connections are short lived connections used to getaddr from a peer - previously called "one shot" connections
2020-08-07[net/refactor] Add feeler connections to ConnectionType enumAmiti Uttarwar
2020-08-07[net/refactor] Add manual connections to ConnectionType enumAmiti Uttarwar
2020-08-02refactor: Use C++11 range based for loops to simplify rpc codeMarcoFalke
2020-07-08rpc: deprecate banscore field in rpc getpeerinfoJon Atack
2020-07-03Clean up separated ban/discourage interfacePieter Wuille
2020-07-03Replace automatic bans with discouragement filterPieter Wuille
This patch improves performance and resource usage around IP addresses that are banned for misbehavior. They're already not actually banned, as connections from them are still allowed, but they are preferred for eviction if the inbound connection slots are full. Stop treating these like manually banned IP ranges, and instead just keep them in a rolling Bloom filter of misbehaving nodes, which isn't persisted to disk or exposed through the ban framework. The effect remains the same: preferred for eviction, avoided for outgoing connections, and not relayed to other peers. Also change the name of this mechanism to better reflect reality; they're not banned, just discouraged. Contains release notes and several interface improvements by John Newbery.
2020-06-10Make GetWarnings() return bilingual_strHennadii Stepanov
2020-05-13scripted-diff: Remove g_rpc_node referencesRussell Yanofsky
This commit does not change behavior -BEGIN VERIFY SCRIPT- git grep -l g_rpc_node | xargs sed -i 's/g_rpc_node->/node./g' -END VERIFY SCRIPT-
2020-05-13refactor: Pass NodeContext to RPC and REST methods through util::RefRussell Yanofsky
This commit does not change behavior
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-04-06rpc: Avoid initialization-order-fiasco on static CRPCCommand tablesMarcoFalke
2020-03-25Merge #18134: Replace std::to_string with locale-independent alternativeWladimir J. van der Laan
d056df033a1e88554f7cc39dd709a87b17cb49df Replace std::to_string with locale-independent alternative (Ben Woosley) Pull request description: Addresses #17866 following practicalswift's suggestion: https://github.com/bitcoin/bitcoin/issues/17866#issuecomment-584287299 ~Used ::ToString to avoid aliasing issues. Left uses in QT and test.~ ACKs for top commit: practicalswift: ACK d056df033a1e88554f7cc39dd709a87b17cb49df laanwj: ACK d056df033a1e88554f7cc39dd709a87b17cb49df Tree-SHA512: 9e6966a9cdd14f4a1a40d9f0fa7c402aed22b2f1ad8681708e22b050d51a91c5d62220a9ec4c425be2d57acf5c964fca87a5e981b5cbff048bc3b6720dae92b7
2020-03-14Replace std::to_string with locale-independent alternativeBen Woosley
2020-03-13rpc: Document an RPCResult for all calls; Enforce at compile timeMarcoFalke
2020-03-05Merge #18260: refactor: Fix implicit value conversion in formatPingTimeMarcoFalke
1891245e7318bf625bbf67aab08a79fc3e87b61d refactor: Cast ping values to double before output (Ben Woosley) 7a810b1d7a9d03818706dc94457dc3255f062796 refactor: Convert ping wait time from double to int64_t (Ben Woosley) e6fc63ec7ee637a4b533e4d7b22def05e74e1dff refactor: Convert min ping time from double to int64_t (Ben Woosley) b054c46977667953593819248c167545aa3e7a40 refactor: Convert ping time from double to int64_t (Ben Woosley) Pull request description: Alternative to #18252, see motivation there. This changes `CNodeStats` to handle ping timestamps as their original incoming usec `int64_t` values until the time they need to be displayed. ACKs for top commit: vasild: ACK 1891245 practicalswift: ACK 1891245e7318bf625bbf67aab08a79fc3e87b61d -- patch looks correct promag: ACK 1891245e7318bf625bbf67aab08a79fc3e87b61d, added cast to double and also braces. Tree-SHA512: 7cfcba941d9751b522b8c512c25da493338b444637bd0bb711b152d7d86b431ca0968956be3c844ee9dbfea25edab44a0de2afa44f2c9c0bf5b8df53eba66272
2020-03-05refactor: Cast ping values to double before outputBen Woosley
Note the divisor is a floating point literal so presumably also floating point.
2020-03-04refactor: Convert ping wait time from double to int64_tBen Woosley
2020-03-04refactor: Convert min ping time from double to int64_tBen Woosley
2020-03-04refactor: Convert ping time from double to int64_tBen Woosley
2020-03-04rpc: fix getpeerinfo RPCResult `mapped_as` typeJon Atack
and mention it is only available if the asmap config flag is set.
2020-02-25rpc: Auto-format RPCResultMarcoFalke
2020-02-09scripted-diff: Add missing spaces in RPCResult, Fix type namesMarcoFalke
This makes the rendered diff smaller when the RPCResult is machine generated later on -BEGIN VERIFY SCRIPT- # Add space after dictionary key and before colon sed -i --regexp-extended -e 's/(^ +" +\\"[a-zA-Z_]+\\"): ?/\1 : /g' $(git grep -l '\\":') # Rename (array) to (json array) sed -i -e 's/ (array) / (json array) /g' $(git grep -l '(array)' ./src) # Rename (object) to (json object) sed -i -e 's/ (object) / (json object) /g' $(git grep -l '(object)' ./src) # Rename (bool) to (boolean) sed -i -e 's/ (bool) / (boolean) /g' $(git grep -l '(bool)' ./src) # Rename (int) to (numeric) sed -i -e 's/ (int) / (numeric) /g' $(git grep -l '(int)' ./src) -END VERIFY SCRIPT-