0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-08 14:34:53 -05:00
bitcoin-core/src/rpc
Andrew Chow 75462b39d2
Merge bitcoin/bitcoin#28554: bugfix: throw an error if an invalid parameter is passed to getnetworkhashps RPC
9ac114e5cd Throw error if invalid parameters passed to getnetworkhashps RPC endpoint (Jameson Lopp)

Pull request description:

  When writing some scripts that iterated over many blocks to generate hashrate estimates I realized that my script was going out of range of the current chain tip height but was not encountering any errors.

  I believe that passing an invalid block height to this function but receiving the hashrate estimate for the chain tip instead should be considered unexpected behavior.

ACKs for top commit:
  Sjors:
    re-utACK 9ac114e5cd
  kevkevinpal:
    reACK [9ac114e](9ac114e5cd)
  achow101:
    ACK 9ac114e5cd

Tree-SHA512: eefb465c2dd654fc48267f444e1809597ec5363cdd131ea9ec812458fed1e4bffbbbb0617d74687c9f7bb16274b598d8292f5eeb7953421e5d2a8dc2cc081f2b
2023-11-28 16:26:04 -05:00
..
blockchain.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
blockchain.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
client.cpp rpc: addnode arg to use BIP324 v2 p2p 2023-10-02 18:10:30 -04:00
client.h refactor: rpc: hide and rename ParseNonRFCJSONValue() 2023-03-23 18:18:46 +00:00
external_signer.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
fees.cpp rpc: Run type check against RPCArgs 2023-01-11 17:42:09 +01:00
mempool.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
mempool.h
mining.cpp Merge bitcoin/bitcoin#28554: bugfix: throw an error if an invalid parameter is passed to getnetworkhashps RPC 2023-11-28 16:26:04 -05:00
mining.h
net.cpp Merge bitcoin/bitcoin#28155: net: improves addnode / m_added_nodes logic 2023-11-08 11:31:36 +00:00
node.cpp interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes 2023-10-20 10:30:16 -04:00
output_script.cpp Add PubKeyDestination for P2PK scripts 2023-09-12 12:14:31 -04:00
protocol.h
rawtransaction.cpp scripted-diff: Use DataStream in most places 2023-11-28 12:42:37 +01:00
rawtransaction_util.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
rawtransaction_util.h wallet: add outputs arguments to bumpfee and psbtbumpfee 2023-01-17 13:28:53 +02:00
register.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
request.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
request.h
server.cpp Merge bitcoin/bitcoin#28605: Fix typos 2023-11-16 10:35:49 +00:00
server.h Use ParamsWrapper for witness serialization 2023-11-14 08:45:30 +10:00
server_util.cpp refactor: add and use EnsureAnyAddrman in rpc 2023-10-04 08:53:51 +05:30
server_util.h refactor: add and use EnsureAnyAddrman in rpc 2023-10-04 08:53:51 +05:30
signmessage.cpp
txoutproof.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
util.cpp Merge bitcoin/bitcoin#28605: Fix typos 2023-11-16 10:35:49 +00:00
util.h Merge bitcoin/bitcoin#28605: Fix typos 2023-11-16 10:35:49 +00:00