0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-10 15:46:48 -04:00
bitcoin-core/src/rpc
Wladimir J. van der Laan bd00d3b1f2
Merge #19658: [rpc] Allow RPC to fetch all addrman records and add records to addrman
37a480e0cd [net] Add addpeeraddress RPC method (John Newbery)
ae8051bbd8 [test] Test that getnodeaddresses() can return all known addresses (John Newbery)
f26502e9fc [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 37a480e0cd
  laanwj:
    Code review and lightly manually tested ACK 37a480e0cd

Tree-SHA512: f86dcd410aaebaf6e9ca18ce6f23556e5e4649c1325577213d873aa09967298e65ab2dc19a72670641ae92211a923afda1fe124a82e9d2c1cad73d478ef27fdc
2020-08-12 15:23:06 +02:00
..
blockchain.cpp rpc: RPCResult Type of MempoolEntryDescription should be OBJ. If multiple entries are possible, wrapping Type should be OBJ_DYN. fixes #19579 2020-07-24 18:15:51 +02:00
blockchain.h validation: Make ProcessNewBlock*() members of ChainstateManager 2020-05-21 09:56:16 -04:00
client.cpp [net] Add addpeeraddress RPC method 2020-08-12 09:22:10 +01:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mining.cpp refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) 2020-06-24 18:41:45 +02:00
mining.h rpc: create rpc/mining.h, hoist default max tries values to constant 2020-06-01 15:08:36 +02:00
misc.cpp refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) 2020-06-24 18:41:45 +02:00
net.cpp Merge #19658: [rpc] Allow RPC to fetch all addrman records and add records to addrman 2020-08-12 15:23:06 +02:00
protocol.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
rawtransaction.cpp refactor: Make HexStr take a span 2020-08-06 19:41:43 +02:00
rawtransaction_util.cpp refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) 2020-06-24 18:41:45 +02:00
rawtransaction_util.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
register.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
request.cpp refactor: Make HexStr take a span 2020-08-06 19:41:43 +02:00
request.h Remove g_rpc_chain global 2020-05-28 02:13:19 -04:00
server.cpp Merge #19386: rpc: Assert that RPCArg names are equal to CRPCCommand ones (server) 2020-07-15 19:20:21 +02:00
server.h rpc: Assert that passed arg names are equal to hardcoded ones 2020-07-03 10:32:36 -04:00
util.cpp refactor: Make HexStr take a span 2020-08-06 19:41:43 +02:00
util.h Merge #19386: rpc: Assert that RPCArg names are equal to CRPCCommand ones (server) 2020-07-15 19:20:21 +02:00