aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.test.include
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-11-19 12:32:29 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-11-19 12:32:48 +0100
commit9ab9665c74dd27d80f44f0713daf3694bbe700e4 (patch)
tree425a27a71bc0559607095ba0a079324fe18eb824 /src/Makefile.test.include
parentd9180c50b689d2fc05662579d2e742e4cc49ac5e (diff)
parent7486e2771e7b5d6fa84df6e954be76350c84e220 (diff)
downloadbitcoin-9ab9665c74dd27d80f44f0713daf3694bbe700e4.tar.xz
Merge #15710: wallet: Catch ios_base::failure specifically
7486e2771e7b5d6fa84df6e954be76350c84e220 Tests: Unit test related to WalletDB ReadKeyValue (Bushstar) 32def8d1c29e0855fe5429687acabd2f29119316 Catch ios_base::failure specifically (Peter Bushnell) Pull request description: In https://github.com/bitcoin/bitcoin/pull/2950 a hash of the pubkey and private was added to speed up key import, this was made backwards compatible by reading the hash in a try block with an ellipses catch all in case the hash was not present. CDataStream::read() specifically throws std::ios_base::failure, backwards compatibility expects only that error to be thrown, if something else gets thrown we should not be catching it. The change in this commit is to catch that exception only. If any other exception is thrown other than std::ios_base::failure it will be caught by the wider try block and an error written to the log and/or console. CDataStream::read() throwing std::ios_base::failure. https://github.com/bitcoin/bitcoin/blob/2c364fde423e74b4e03ebcff4582a9db7a6c4e4b/src/streams.h#L191 Wider catch statements that pick up all others exceptions other than ios_base::failure. https://github.com/bitcoin/bitcoin/blob/2c364fde423e74b4e03ebcff4582a9db7a6c4e4b/src/wallet/walletdb.cpp#L425 https://github.com/bitcoin/bitcoin/blob/2c364fde423e74b4e03ebcff4582a9db7a6c4e4b/src/wallet/walletdb.cpp#L430 ACKs for top commit: laanwj: Code review ACK 7486e2771e7b5d6fa84df6e954be76350c84e220 Tree-SHA512: 5364bf935af8ec603bf5b8fef8c23b5cdaa4fe3506090cff988413221f2eaa99f7a91929afb42a35f8881ce2328744a0d32052da51ca0a5b2e65b6809e97f604
Diffstat (limited to 'src/Makefile.test.include')
-rw-r--r--src/Makefile.test.include1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 9cc383c240..f6c5a06f6f 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -295,6 +295,7 @@ BITCOIN_TESTS += \
wallet/test/db_tests.cpp \
wallet/test/psbt_wallet_tests.cpp \
wallet/test/wallet_tests.cpp \
+ wallet/test/walletdb_tests.cpp \
wallet/test/wallet_crypto_tests.cpp \
wallet/test/coinselector_tests.cpp \
wallet/test/init_tests.cpp \