aboutsummaryrefslogtreecommitdiff
path: root/src/test/util_tests.cpp
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-11 16:32:42 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-11 16:32:45 +0200
commit27d7b11e8ce25ebc79be5284d85cede263fa1362 (patch)
tree87785823ac5b38259936ba1e07986d3f44e826a5 /src/test/util_tests.cpp
parentb8ded26ef3d7c58a938050659e4c50d850628dff (diff)
parent9feb887082be911a8342f8090af4dca3db76db9b (diff)
Merge bitcoin/bitcoin#25106: rpc: dumptxoutset: check `fopen` return code
9feb887082be911a8342f8090af4dca3db76db9b rpc: check `fopen` return code in dumptxoutset (Sebastian Falbesoner) Pull request description: This change improves the usability of the `dumptxoutset` RPC in two ways, in the case that an invalid path is passed: 1. return from the RPC immediately, rather then when the file is first tried to be written (which is _after_ calculating the UTXO set hash) 2. return a proper return code and error message instead of the cryptic message that appears on master currently (see below) master branch: (error message appears after several minutes on my machine) ``` $ ./src/bitcoin-cli dumptxoutset /invalid/path error code: -1 error message: CAutoFile::operator<<: file handle is nullptr: unspecified iostream_category error ``` PR branch: (error message appears immediately) ``` $ ./src/bitcoin-cli dumptxoutset /invalid/path error code: -8 error message: Couldn't open file /invalid/path.incomplete for writing. ``` ACKs for top commit: w0xlt: Code Review ACK https://github.com/bitcoin/bitcoin/pull/25106/commits/9feb887082be911a8342f8090af4dca3db76db9b Tree-SHA512: e8695a7e86f26cc3b086d6bc6888388061f1dee439f76409b3ee11d35032bfd9cfa5349b728cd7f45bcffd999ecf9a6a991be172ce587b9b14503d9916b6e984
Diffstat (limited to 'src/test/util_tests.cpp')
0 files changed, 0 insertions, 0 deletions