aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
AgeCommit message (Collapse)Author
2018-03-05Merge #12516: Avoid unintentional unsigned integer wraparounds in testsWladimir J. van der Laan
2736c9e05 Avoid unintentional unsigned integer wraparounds in tests (practicalswift) Pull request description: Avoid unintentional unsigned integer wraparounds in tests. This is a subset of #11535 as suggested by @MarcoFalke :-) Tree-SHA512: 4f4ee8a08870101a3f7451aefa77ae06aaf44e3c3b2f7555faa2b8a8503f97f34e34dffcf65154278f15767dc9823955f52d1aa7b39930b390e57cdf2b65e0f3
2018-03-03Allow wallet files in multiple directoriesRussell Yanofsky
Remove requirement that two wallet files can only be opened at the same time if they are contained in the same directory. This change mostly consists of updates to function signatures (updating functions to take fs::path arguments, instead of combinations of strings, fs::path, and CDBEnv / CWalletDBWrapper arguments).
2018-03-02Fix ListCoins test failure due to unset g_wallet_allow_fallback_feeRussell Yanofsky
New global variables were introduced in #11882 and not setting them causes: wallet/test/wallet_tests.cpp(638): error in "ListCoins": check wallet->CreateTransaction({recipient}, wtx, reservekey, fee, changePos, error, dummy) failed wallet/test/wallet_tests.cpp(679): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2] wallet/test/wallet_tests.cpp(686): error in "ListCoins": check available.size() == 2 failed [1 != 2] wallet/test/wallet_tests.cpp(705): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2] It's possible to reproduce the failure reliably by running: src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ListCoins Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug.
2018-03-01Merge #11882: Disable default fallbackfee on mainnetWladimir J. van der Laan
3f592b8 [QA] add wallet-rbf test (Jonas Schnelli) 8222e05 Disable wallet fallbackfee by default on mainnet (Jonas Schnelli) Pull request description: Removes the default fallback fee on mainnet (but keeps it on testnet/regtest). Transactions using the fallbackfee in case the fallback fee has not been set are getting rejected. Tree-SHA512: e54d2594b7f954e640cc513a18b0bfbe189f15e15bdeed4fe02b7677f939bca1731fef781b073127ffd4ce08a595fb118259b8826cdaa077ff7d5ae9495810db
2018-02-25Disable wallet fallbackfee by default on mainnetJonas Schnelli
2018-02-23Avoid unintentional unsigned integer wraparounds in testspracticalswift
2018-02-13Fix rescan test failure due to unset g_address_type, g_change_typeRussell Yanofsky
New global variables were introduced in #11403 and not setting them causes: test_bitcoin: wallet/wallet.cpp:4259: CTxDestination GetDestinationForKey(const CPubKey&, OutputType): Assertion `false' failed. unknown location(0): fatal error in "importwallet_rescan": signal: SIGABRT (application abort requested) It's possible to reproduce the failure reliably by running: src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/importwallet_rescan Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug.
2018-02-08[wallet] Make CWallet::ListCoins atomicJoão Barbosa
2018-01-28Fix typospracticalswift
2018-01-23Make sure WalletRescanReserver has successfully reserved the rescanJonas Schnelli
2018-01-11Fix ListCoins test failure due to unset g_address_type, g_change_typeRussell Yanofsky
New global variables were introduced in #11403 and not setting them causes: test_bitcoin: wallet/wallet.cpp:4199: CTxDestination GetDestinationForKey(const CPubKey&, OutputType): Assertion `false' failed. unknown location(0): fatal error in "ListCoins": signal: SIGABRT (application abort requested) It's possible to reproduce the failure reliably by running: src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ListCoins Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug.
2018-01-10Merge #11403: SegWit wallet supportJonas Schnelli
b224a47a1 Add address_types test (Pieter Wuille) 7ee54fd7c Support downgrading after recovered keypool witness keys (Pieter Wuille) 940a21932 SegWit wallet support (Pieter Wuille) f37c64e47 Implicitly know about P2WPKH redeemscripts (Pieter Wuille) 57273f2b3 [test] Serialize CTransaction with witness by default (Pieter Wuille) cf2c0b6f5 Support P2WPKH and P2SH-P2WPKH in dumpprivkey (Pieter Wuille) 37c03d3e0 Support P2WPKH addresses in create/addmultisig (Pieter Wuille) 3eaa003c8 Extend validateaddress information for P2SH-embedded witness (Pieter Wuille) 30a27dc5b Expose method to find key for a single-key destination (Pieter Wuille) 985c79552 Improve witness destination types and use them more (Pieter Wuille) cbe197470 [refactor] GetAccount{PubKey,Address} -> GetAccountDestination (Pieter Wuille) 0c8ea6380 Abstract out IsSolvable from Witnessifier (Pieter Wuille) Pull request description: This implements a minimum viable implementation of SegWit wallet support, based on top of #11389, and includes part of the functionality from #11089. Two new configuration options are added: * `-addresstype`, with options `legacy`, `p2sh`, and `bech32`. It controls what kind of addresses are produced by `getnewaddress`, `getaccountaddress`, and `createmultisigaddress`. * `-changetype`, with the same options, and by default equal to `-addresstype`, that controls what kind of change is used. All wallet private and public keys can be used for any type of address. Support for address types dependent on different derivation paths will need a major overhaul of how our internal detection of outputs work. I expect that that will happen for a next major version. The above also applies to imported keys, as having a distinction there but not for normal operations is a disaster for testing, and probably for comprehension of users. This has some ugly effects, like needing to associate the provided label to `importprivkey` with each style address for the corresponding key. To deal with witness outputs requiring a corresponding redeemscript in wallet, three approaches are used: * All SegWit addresses created through `getnewaddress` or multisig RPCs explicitly get their redeemscripts added to the wallet file. This means that downgrading after creating a witness address will work, as long as the wallet file is up to date. * All SegWit keys in the wallet get an _implicit_ redeemscript added, without it being written to the file. This means recovery of an old backup will work, as long as you use new software. * All keypool keys that are seen used in transactions explicitly get their redeemscripts added to the wallet files. This means that downgrading after recovering from a backup that includes a witness address will work. These approaches correspond to solutions 3a, 1a, and 5a respectively from https://gist.github.com/sipa/125cfa1615946d0c3f3eec2ad7f250a2. As argued there, there is no full solution for dealing with the case where you both downgrade and restore a backup, so that's also not implemented. `dumpwallet`, `importwallet`, `importmulti`, `signmessage` and `verifymessage` don't work with SegWit addresses yet. They're remaining TODOs, for this PR or a follow-up. Because of that, several tests unexpectedly run with `-addresstype=legacy` for now. Tree-SHA512: d425dbe517c0422061ab8dacdc3a6ae47da071450932ed992c79559d922dff7b2574a31a8c94feccd3761c1dffb6422c50055e6dca8e3cf94a169bc95e39e959
2018-01-09SegWit wallet supportPieter Wuille
This introduces two command line flags (-addresstype and -changetype) which control the type of addresses/outputs created by the GUI and RPCs. Certain RPCs allow overriding these (`getnewaddress` and `getrawchangeaddress`). Supported types are "legacy" (P2PKH and P2SH-multisig), "p2sh-segwit" (P2SH-P2WPKH and P2SH-P2WSH-multisig), and "bech32" (P2WPKH and P2WSH-multisig). A few utility functions are added to the wallet to construct different address type and to add the necessary entries to the wallet file to be compatible with earlier versions (see `CWallet::LearnRelatedScripts`, `GetDestinationForKey`, `GetAllDestinationsForKey`, `CWallet::AddAndGetDestinationForScript`).
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-12-26Require no cs_main lock for ProcessNewBlock/ActivateBestChainMatt Corallo
This requires the removal of some very liberal (incorrect) cs_mains sprinkled in some tests. It adds some chainActive.Tip() races, but the tests are all single-threaded anyway.
2017-11-18tests: move pwalletMain to wallet test fixtureWladimir J. van der Laan
Scope the variable instead of using an external global; this is how test fixtures are intended to be used. Followup to #11713.
2017-11-18Fix for mismatched extern definition in wallet test classes which was ↵Aaron Clauson
breaking msvc linking.
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
2017-11-10tests: Add missing locks to testspracticalswift
Add missing locks to tests to satisfy lock requirements (such as EXCLUSIVE_LOCKS_REQUIRED(...) (Clang Thread Safety Analysis), AssertLockHeld(...) and implicit lock assumptions).
2017-11-09Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...))practicalswift
2017-11-09Use unique_ptr for pwalletMain (CWallet)practicalswift
2017-11-09Merge #10368: [wallet] Remove helper conversion operator from walletWladimir J. van der Laan
5a5e4e9 [wallet] Remove CTransaction&() helper conversion operator from wallet implementation. (Karl-Johan Alm) Pull request description: The `CTransaction&()` operator in `CMerkleTx` makes conversion into `CTransaction`s transparent, but was marked as to-be-removed in favor of explicitly getting the `tx` ivar, presumably as the operator can lead to ambiguous behavior and makes the code harder to follow. This PR removes the operator and adapts callers. This includes some cases of `static_cast<CTransaction>(wtx)` → `*wtx.tx`, which is definitely an improvement. Tree-SHA512: 95856fec7194d6a79615ea1c322abfcd6bcedf6ffd0cfa89bbdd332ce13035fa52dd4b828d20df673072dde1be64b79c513529a6f422dd5f0961ce722a32d56a
2017-10-13Merge #7061: [Wallet] Add RPC call "rescanblockchain <startheight> <stopheight>"Jonas Schnelli
7a91ceb5e [QA] Add RPC based rescan test (Jonas Schnelli) c77170fbd [Wallet] add rescanblockchain <start_height> <stop_height> RPC command (Jonas Schnelli) Pull request description: A RPC rescan command is much more flexible for the following reasons: * You can define the start and end-height * It can be called during runtime * It can work in multiwallet environment Tree-SHA512: df67177bad6ad1d08e5a621f095564524fa3eb87204c2048ef7265e77013e4b1b29f991708f807002329a507a254f35e79a4ed28a2d18d4b3da7a75d57ce0ea5
2017-10-12[Wallet] add rescanblockchain <start_height> <stop_height> RPC commandJonas Schnelli
2017-09-08Changing &vec[0] to vec.data(), what 9804 missedMeshCollider
2017-08-24Acquire cs_main lock before cs_wallet during wallet initializationRussell Yanofsky
CWallet::MarkConflicted may acquire the cs_main lock after CWalletDB::LoadWallet acquires the cs_wallet lock during wallet initialization. (CWalletDB::LoadWallet calls ReadKeyValue which calls CWallet::LoadToWallet which calls CWallet::MarkConflicted). This is the opposite order that cs_main and cs_wallet locks are acquired in the rest of the code, and so leads to POTENTIAL DEADLOCK DETECTED errors if bitcoin is built with -DDEBUG_LOCKORDER. This commit changes CWallet::LoadWallet (which calls CWalletDB::LoadWallet) to acquire both locks in the standard order. It also fixes some tests that were acquiring wallet and main locks out of order and failed with the new locking in CWallet::LoadWallet. Error was reported by Luke Dashjr <luke-jr@utopios.org> in https://botbot.me/freenode/bitcoin-core-dev/msg/90244330/
2017-08-22Merge #11024: tests: Remove OldSetKeyFromPassphrase/OldEncrypt/OldDecryptWladimir J. van der Laan
a897d0e tests: Remove OldSetKeyFromPassphrase/OldEncrypt/OldDecrypt (practicalswift) Pull request description: Reduces the number of non-free:d allocs with four (Δ in use at exit = -928 bytes). With this patch applied: ``` $ valgrind --leak-check=full --show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite --run_test=wallet_crypto … ==20243== HEAP SUMMARY: ==20243== in use at exit: 72,704 bytes in 1 blocks ==20243== total heap usage: 53,138 allocs, 53,137 frees, 49,600,420 bytes allocated ==20243== ==20243== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1 ==20243== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20243== by 0x6AA5EFF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21) ==20243== by 0x40106B9: call_init.part.0 (dl-init.c:72) ==20243== by 0x40107CA: call_init (dl-init.c:30) ==20243== by 0x40107CA: _dl_init (dl-init.c:120) ==20243== by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so) ==20243== by 0x2: ??? ==20243== by 0xFFF0006A2: ??? ==20243== by 0xFFF0006B8: ??? ==20243== by 0xFFF0006CF: ??? ==20243== ==20243== LEAK SUMMARY: ==20243== definitely lost: 0 bytes in 0 blocks ==20243== indirectly lost: 0 bytes in 0 blocks ==20243== possibly lost: 0 bytes in 0 blocks ==20243== still reachable: 72,704 bytes in 1 blocks ==20243== suppressed: 0 bytes in 0 blocks ``` Without this patch applied: ``` $ valgrind --leak-check=full --show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite --run_test=wallet_crypto … ==19023== HEAP SUMMARY: ==19023== in use at exit: 73,632 bytes in 5 blocks ==19023== total heap usage: 52,718 allocs, 52,713 frees, 49,502,962 bytes allocated ==19023== ==19023== 24 bytes in 1 blocks are still reachable in loss record 1 of 5 ==19023== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19023== by 0x642DE77: CRYPTO_malloc (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E5665: lh_insert (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E7BB3: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E87AD: ERR_get_state (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E883D: ERR_put_error (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64EAAE4: EVP_DecryptFinal_ex (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x3AD150: wallet_crypto::OldDecrypt(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, secure_allocator<unsigned char> >&, unsigned char const*, unsigned char const*) (crypto_tests.cpp:81) ==19023== by 0x3AF892: wallet_crypto::TestCrypter::TestDecrypt(CCrypter const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&) (crypto_tests.cpp:137) ==19023== by 0x3AD5E9: wallet_crypto::decrypt::test_method() (crypto_tests.cpp:223) ==19023== by 0x3ADC11: wallet_crypto::decrypt_invoker() (crypto_tests.cpp:216) ==19023== by 0x182596: invoke<void (*)()> (callback.hpp:56) ==19023== by 0x182596: boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() (callback.hpp:89) ==19023== ==19023== 128 bytes in 1 blocks are still reachable in loss record 2 of 5 ==19023== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19023== by 0x642DE77: CRYPTO_malloc (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E5331: lh_new (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E7862: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E7B7F: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E87AD: ERR_get_state (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E883D: ERR_put_error (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64EAAE4: EVP_DecryptFinal_ex (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x3AD150: wallet_crypto::OldDecrypt(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, secure_allocator<unsigned char> >&, unsigned char const*, unsigned char const*) (crypto_tests.cpp:81) ==19023== by 0x3AF892: wallet_crypto::TestCrypter::TestDecrypt(CCrypter const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&) (crypto_tests.cpp:137) ==19023== by 0x3AD5E9: wallet_crypto::decrypt::test_method() (crypto_tests.cpp:223) ==19023== by 0x3ADC11: wallet_crypto::decrypt_invoker() (crypto_tests.cpp:216) ==19023== ==19023== 176 bytes in 1 blocks are still reachable in loss record 3 of 5 ==19023== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19023== by 0x642DE77: CRYPTO_malloc (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E530F: lh_new (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E7862: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E7B7F: ??? (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E87AD: ERR_get_state (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E883D: ERR_put_error (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64EAAE4: EVP_DecryptFinal_ex (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x3AD150: wallet_crypto::OldDecrypt(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, secure_allocator<unsigned char> >&, unsigned char const*, unsigned char const*) (crypto_tests.cpp:81) ==19023== by 0x3AF892: wallet_crypto::TestCrypter::TestDecrypt(CCrypter const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&) (crypto_tests.cpp:137) ==19023== by 0x3AD5E9: wallet_crypto::decrypt::test_method() (crypto_tests.cpp:223) ==19023== by 0x3ADC11: wallet_crypto::decrypt_invoker() (crypto_tests.cpp:216) ==19023== ==19023== 600 bytes in 1 blocks are still reachable in loss record 4 of 5 ==19023== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19023== by 0x642DE77: CRYPTO_malloc (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E8745: ERR_get_state (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64E883D: ERR_put_error (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x64EAAE4: EVP_DecryptFinal_ex (in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) ==19023== by 0x3AD150: wallet_crypto::OldDecrypt(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, secure_allocator<unsigned char> >&, unsigned char const*, unsigned char const*) (crypto_tests.cpp:81) ==19023== by 0x3AF892: wallet_crypto::TestCrypter::TestDecrypt(CCrypter const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&) (crypto_tests.cpp:137) ==19023== by 0x3AD5E9: wallet_crypto::decrypt::test_method() (crypto_tests.cpp:223) ==19023== by 0x3ADC11: wallet_crypto::decrypt_invoker() (crypto_tests.cpp:216) ==19023== by 0x182596: invoke<void (*)()> (callback.hpp:56) ==19023== by 0x182596: boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() (callback.hpp:89) ==19023== by 0x596CCB0: ??? (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0) ==19023== by 0x594C995: boost::execution_monitor::catch_signals(boost::unit_test::callback0<int> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0) ==19023== ==19023== 72,704 bytes in 1 blocks are still reachable in loss record 5 of 5 ==19023== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19023== by 0x6AA5EFF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21) ==19023== by 0x40106B9: call_init.part.0 (dl-init.c:72) ==19023== by 0x40107CA: call_init (dl-init.c:30) ==19023== by 0x40107CA: _dl_init (dl-init.c:120) ==19023== by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so) ==19023== by 0x2: ??? ==19023== by 0xFFF0006A2: ??? ==19023== by 0xFFF0006B8: ??? ==19023== by 0xFFF0006CF: ??? ==19023== ==19023== LEAK SUMMARY: ==19023== definitely lost: 0 bytes in 0 blocks ==19023== indirectly lost: 0 bytes in 0 blocks ==19023== possibly lost: 0 bytes in 0 blocks ==19023== still reachable: 73,632 bytes in 5 blocks ==19023== suppressed: 0 bytes in 0 blocks ==19023== ==19023== For counts of detected and suppressed errors, rerun with: -v ==19023== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ``` Tree-SHA512: 38b6552736a5710a42dbad770c490583cfc762acbec716f5db4cf38314f494ea99430713ea407c73b49d867676ced221a282437f3fcfd8346f8f68386f4fc74d
2017-08-16Declare single-argument (non-converting) constructors "explicit"practicalswift
In order to avoid unintended implicit conversions.
2017-08-14tests: Remove OldSetKeyFromPassphrase/OldEncrypt/OldDecryptpracticalswift
2017-08-07scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift
instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
2017-07-26Merge #10912: [tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cppWladimir J. van der Laan
065039d [tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cpp (practicalswift) Pull request description: `chKey` and `chIV` are pointers, not arrays :-) Probably the result of copy-pasting of old code where the code was operating on arrays instead of pointers. If I'm reading the code correctly the absence/presence of these `memory_cleanse(…)` calls won't alter the outcome of the test in question (`TestPassphraseSingle`) even if fixed. Therefore removing. Tree-SHA512: a053b2817bedf6ef889744e546ce9a0f165dee94aef6850d9d6a6bb05b0018789597371ecf154a4aec8588c0ef5626ef08c23c35e35927f6b0497b5f086146fe
2017-07-26[tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cpppracticalswift
chKey and chIV are pointers, not arrays :-) Probably the result of copy-pasting of old code which was operating on arrays instead of pointers.
2017-07-25test: Make sure wallet.backup is created in temp pathWladimir J. van der Laan
This assures that we don't overwrite a random file called `wallet.backup` that happens to be in the current directory. It also assures that the temporary file will be cleaned up. Noticed by Evan Klitzke, came up in discussion here: https://github.com/bitcoin/bitcoin/pull/10880#discussion_r128460722
2017-07-14Make CoinControl a required argument to CreateTransactionAlex Morcos
2017-06-22scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón
-BEGIN VERIFY SCRIPT- sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp -END VERIFY SCRIPT-
2017-06-13Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPEPieter Wuille
1238f13cf scripted-diff: Remove PAIRTYPE (Jorge Timón) 18dc3c396 scripted-diff: Remove Q_FOREACH (Jorge Timón) 7c00c2672 scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón) a5410ac5e Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón) Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
2017-06-12Merge #8694: Basic multiwallet supportWladimir J. van der Laan
c237bd7 wallet: Update formatting (Luke Dashjr) 9cbe8c8 wallet: Forbid -salvagewallet, -zapwallettxes, and -upgradewallet with multiple wallets (Luke Dashjr) a2a5f3f wallet: Base backup filenames on original wallet filename (Luke Dashjr) b823a4c wallet: Include actual backup filename in recovery warning message (Luke Dashjr) 84dcb45 Bugfix: wallet: Fix warningStr, errorStr argument order (Luke Dashjr) 008c360 Wallet: Move multiwallet sanity checks to CWallet::Verify, and do other checks on all wallets (Luke Dashjr) 0f08575 Wallet: Support loading multiple wallets if -wallet used more than once (Luke Dashjr) b124cf0 Wallet: Replace pwalletMain with a vector of wallet pointers (Luke Dashjr) 19b3648 CWalletDB: Store the update counter per wallet (Luke Dashjr) 74e8738 Bugfix: ForceSetArg should replace entr(ies) in mapMultiArgs, not append (Luke Dashjr) 23fb9ad wallet: Move nAccountingEntryNumber from static/global to CWallet (Luke Dashjr) 9d15d55 Bugfix: wallet: Increment "update counter" when modifying account stuff (Luke Dashjr) f28eb80 Bugfix: wallet: Increment "update counter" only after actually making the applicable db changes to avoid potential races (Luke Dashjr) Tree-SHA512: 23f5dda58477307bc07997010740f1dc729164cdddefd2f9a2c9c7a877111eb1516d3e2ad4f9b104621f0b7f17369c69fcef13d28b85cb6c01d35f09a8845f23
2017-06-09Remove unused Boost includespracticalswift
2017-06-07scripted-diff: Use new naming style for insecure_rand* functionsPieter Wuille
-BEGIN VERIFY SCRIPT- sed -i 's/\<insecure_randbits(/InsecureRandBits(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbool(/InsecureRandBool(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randrange(/InsecureRandRange(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbytes(/InsecureRandBytes(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand256(/InsecureRand256(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand(/InsecureRand32(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<seed_insecure_rand(/SeedInsecureRand(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp -END VERIFY SCRIPT-
2017-06-06Wallet: Replace pwalletMain with a vector of wallet pointersLuke Dashjr
2017-06-05Merge test_random.h into test_bitcoin.hPieter Wuille
2017-06-05scripted-diff: Fully remove BOOST_FOREACHJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-06-05Merge #10403: Fix importmulti failure to return rescan errorsWladimir J. van der Laan
4d2d604 Fix importmulti failure to return rescan errors (Russell Yanofsky) Tree-SHA512: e5e6d6c5a2bb7230e1bcac1903a4b766cd57bf781fade50c6c9cd5713cd3e768db0987cfda9699b57a53d3a0a60951b96dce5283b3d3ec1f954162c439bc932b
2017-05-23Merge #10295: [qt] Move some WalletModel functions into CWalletWladimir J. van der Laan
108f04f Add missing LOCK2 in CWallet::GetAvailableBalance (Russell Yanofsky) 429aa9e [test] Move some tests from qt -> wallet (Russell Yanofsky) d944bd7 [qt] Move some WalletModel functions into CWallet (Russell Yanofsky) ef8ca17 [test] Add tests for some walletmodel functions (Russell Yanofsky) Tree-SHA512: f6384d9f2ff3f7fb173d414588c3e7dc8c311b8ed2ce2b0979fb824a0ed83a7302890ccd3d83197f07f6fdcb6b1ca151584d90ea1961d88dfe8956c87087cde8
2017-05-17[test] Move some tests from qt -> walletRussell Yanofsky
After previous refactoring, the tests make more sense here.
2017-05-16Fix importwallet edge case rescan bugRussell Yanofsky
Start importwallet rescans at the first block with timestamp greater or equal to the wallet birthday instead of the last block with timestamp less or equal. This fixes an edge case bug where importwallet could fail to start the rescan early enough if there are blocks with decreasing timestamps or multiple blocks with the same timestamp.
2017-05-15Fix importmulti failure to return rescan errorsRussell Yanofsky
An off-by-one-block bug in importmulti rescan logic could cause it to return success in an edge case even when a rescan was not successful. The case where this would happen is if there were multiple blocks in a row with the same GetBlockTimeMax() value, and the last block was scanned successfully, but one or more of the earlier blocks was not readable.
2017-05-09[wallet] Remove CTransaction&() helper conversion operator from wallet ↵Karl-Johan Alm
implementation.
2017-04-20wallet: Introduce database handle wrapperWladimir J. van der Laan
Abstract database handle from explicit strFilename into CWalletDBWrapper. Also move CWallet::Backup to db.cpp - as it deals with representation details this is a database specific operation.
2017-04-19Merge #9827: Improve ScanForWalletTransactions return valueWladimir J. van der Laan
30abce7 Improve ScanForWalletTransactions return value (Russell Yanofsky) Tree-SHA512: 195028553b103052a842b6a37e67410118a20c32475b80f7fd22d6d8622f92eca1c2d84f291d1092bef2161d3187d91052799b533e1e265b7613d51955490b8d