bitcoin/src/rpc
Wladimir J. van der Laan 9ae468a6d5
Merge #17192: util: Add CHECK_NONFATAL and use it in src/rpc
faeb666536 util: Add CHECK_NONFATAL and use it in src/rpc (MarcoFalke)

Pull request description:

  Fixes #17181

  Currently, we use `assert` in RPC code to document logic and code assumptions. However, it seems a bit extreme to abort all of Bitcoin Core on an assert failure in one of the RPC threads. I suggest to replace all `assert`s with a macro `CHECK_NONFATAL(condition)` that throws a runtime error when the condition evaluates to `false`. That runtime error will then be returned to the rpc caller and will include instructions to report the error to our issue tracker.

ACKs for top commit:
  practicalswift:
    ACK faeb666536
  laanwj:
    ACK faeb666536
  ryanofsky:
    Code review ACK faeb666536

Tree-SHA512: 9b748715a5e0767ac11f1324a95a3a6ec672a0e0658013492219223bda83ce4b1b447fd8183bbb235f7df5ef7dddda7666ad569544b4d61cc65f232ca7a800ec
2019-10-28 12:00:36 +01:00
..
blockchain.cpp util: Add CHECK_NONFATAL and use it in src/rpc 2019-10-18 17:19:36 -04:00
blockchain.h rpc: Add lock annotations to block{,header}ToJSON 2019-05-02 14:33:26 -04:00
client.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mining.cpp Merge #16060: Bury bip9 deployments 2019-08-15 16:02:10 -04:00
misc.cpp util: Add CHECK_NONFATAL and use it in src/rpc 2019-10-18 17:19:36 -04:00
net.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
protocol.h rpc: migrate JSONRPCRequest functionality into request.cpp 2019-07-05 11:22:02 +09:00
rawtransaction.cpp Merge #17004: validation: Remove REJECT code from CValidationState 2019-10-24 10:49:45 +02:00
rawtransaction_util.cpp doc: Fix doxygen comment for SignTransaction in rpc/rawtransaction_util 2019-09-19 13:34:50 -04:00
rawtransaction_util.h doc: Fix doxygen comment for SignTransaction in rpc/rawtransaction_util 2019-09-19 13:34:50 -04:00
register.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
request.cpp rpc: migrate JSONRPCRequest functionality into request.cpp 2019-07-05 11:22:02 +09:00
request.h rpc: migrate JSONRPCRequest functionality into request.cpp 2019-07-05 11:22:02 +09:00
server.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
server.h Remove unused includes 2019-10-15 22:56:43 +00:00
util.cpp rpc/net: decode the services flags in a new entry 2019-09-05 15:11:48 +02:00
util.h util: Add CHECK_NONFATAL and use it in src/rpc 2019-10-18 17:19:36 -04:00