aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/addressbooktests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Dogecoin: Update coinbase maturityRoss Nicoll2021-05-201-1/+1
| | | | | | | * Change coinbase maturity to 240 blocks in most cases, with main/test early chains allowing 30 blocks. I've kept the 240 consistent in regtest to avoid having to redesign a lot of the test cases. * Disabled mining unit test which require COINBASE_MATURITY worth of pre-calculated blocks, as we'd otherwise be constantly refactoring them. * Moved functional test which uses the Bitcoin testnet block data as its reference, as it completely breaks as we introduce Dogecoin data. * Updated standard blockchains for tests from 100/200 to 240/480 as appropriate.
* Remove WalletLocation classRussell Yanofsky2020-09-031-1/+1
| | | | | | | | | | | This removes a source of complexity and indirection that makes it harder to understand path checking code. Path checks will be simplified in upcoming commits. There is no change in behavior in this commit other than a slightly more descriptive error message in `loadwallet` if the default "" wallet can't be found. (The error message is improved more in upcoming commit "wallet: Remove path checking code from loadwallet RPC".)
* wallet: Reload previously loaded wallets on GUI startupAndrew Chow2020-09-011-1/+1
| | | | | | | | | | | Enable the GUI to also use the load_on_startup feature. Wallets loaded in the GUI always have load_on_startup=true. When they are unloaded from the GUI, load_on_startup=false. To facilitate this change, UpdateWalletSetting is moved into the wallet module and called from within LoadWallet, RemoveWallet, and Createwallet. This change does not actually touch the GUI code but rather the wallet functions that are shared between the GUI and RPC.
* gui: Replace interface::Node references with pointersRussell Yanofsky2020-08-261-1/+1
| | | | | | No change in behavior. Replacing references with pointers allows Node interface creation to be delayed until later during gui startup next commit to support implementing -ipcconnect option
* test: Remove duplicate NodeContext hacksRussell Yanofsky2020-07-131-0/+2
| | | | | | | | | | | | | | | | | | | | Qt tests currently are currently using two NodeContext structs at the same time, one in interfaces::NodeImpl::m_context, and the other in BasicTestingSetup::m_node, and the tests have hacks transferring state between them. Fix this by getting rid of the NodeImpl::m_context struct and making it a pointer. This way a common BitcoinApplication object can be used for all qt tests, but they can still have their own testing setups. Non-test code is changing but non-test behavior is still the same as before. Motivation for this PR is to be able to remove the "std::move(test.m_node.connman)" and mempool hacks for swapping individual NodeContext members in Qt tests, because followup PR #19099 adds yet another member (wallet_client) that needs to be swapped. After this change, the whole NodeContext struct can be swapped instead of individual members, so the workarounds are less fragile and invasive.
* scripted-diff: Replace WalletDatabase::Create* with CreateWalletDatabaseAndrew Chow2020-06-171-1/+1
| | | | | | | | -BEGIN VERIFY SCRIPT- sed -i -e 's/WalletDatabase::Create(/CreateWalletDatabase(/g' `git grep -l "WalletDatabase::Create("` sed -i -e 's/WalletDatabase::CreateDummy(/CreateDummyWalletDatabase(/g' `git grep -l "WalletDatabase::CreateDummy("` sed -i -e 's/WalletDatabase::CreateMock(/CreateMockWalletDatabase(/g' `git grep -l "WalletDatabase::CreateMock("` -END VERIFY SCRIPT-
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* Merge #17905: gui: Avoid redundant tx status updatesMarcoFalke2020-04-101-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 96cb597325f64cadb3cf43e2cdb3d7c1e2e49891 gui: Avoid redundant tx status updates (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). In `TransactionTablePriv::index`, avoid calling `interfaces::Wallet::tryGetTxStatus` if the status is up to date as of the most recent `NotifyBlockTip` notification. Store height from the most recent notification in a new `ClientModel::cachedNumBlocks` variable in order to check this. This avoids floods of IPC traffic from `tryGetTxStatus` with #10102 when there are a lot of transactions. It might also make the GUI a little more efficient even when there is no IPC. ACKs for top commit: promag: Code review ACK 96cb597325f64cadb3cf43e2cdb3d7c1e2e49891. hebasto: ACK 96cb597325f64cadb3cf43e2cdb3d7c1e2e49891 Tree-SHA512: fce597bf52a813ad4923110d0a39229ea09e1631e0d580ea18cffb09e58cdbb4b111a40a9a9270ff16d8163cd47b0bd9f1fe7e3a6c7ebb19198f049f8dd1aa46
| * gui: Avoid redundant tx status updatesRussell Yanofsky2020-01-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | In TransactionTablePriv::index, avoid calling interfaces::Wallet::tryGetTxStatus if the status is up to date as of the most recent NotifyBlockTip notification. Store height from the most recent notification in a new ClientModel::cachedNumBlocks variable in order to check this. This avoids floods of IPC traffic from tryGetTxStatus with #10102 when there are a lot of transactions. It might also make the GUI a little more efficient even when there is no IPC.
* | scripted-diff: Wallet: Rename mapAddressBook to m_address_bookLuke Dashjr2020-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | Previous versions assumed absence of an entry in mapAddressBook indicated change. This no longer holds true (due to bugs) and will shortly be made intentional. Renaming the field helps ensure that old code using mapAddressBook directly gets checked for necessary rebasing. -BEGIN VERIFY SCRIPT- sed -i -e 's/mapAddressBook/m_address_book/g' $(git grep -l 'mapAddressBook' ./src) -END VERIFY SCRIPT-
* | Refactor: Allow LegacyScriptPubKeyMan to be nullAndrew Chow2020-01-231-0/+1
| | | | | | | | | | | | In CWallet::LoadWallet, use this to detect and empty wallet with no keys This commit does not change behavior.
* | scripted-diff: Add missed copyright headersHennadii Stepanov2020-01-041-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- s() { contrib/devtools/copyright_header.py insert "$1"; } s build_msvc/bitcoin_config.h s build_msvc/msvc-autogen.py s build_msvc/testconsensus/testconsensus.cpp s contrib/devtools/circular-dependencies.py s contrib/devtools/gen-manpages.sh s contrib/filter-lcov.py s contrib/gitian-build.py s contrib/install_db4.sh s src/crypto/sha256_avx2.cpp s src/crypto/sha256_sse41.cpp s src/fs.cpp s src/qt/test/addressbooktests.cpp s src/qt/test/addressbooktests.h s src/qt/test/util.cpp s src/qt/test/util.h s src/qt/test/wallettests.cpp s src/qt/test/wallettests.h s src/test/blockchain_tests.cpp s test/functional/combine_logs.py s test/lint/lint-locale-dependence.sh sed -i '1G' test/lint/lint-shebang.sh s test/lint/lint-shebang.sh -END VERIFY SCRIPT-
* scripted-diff: test: Move setup_common to test libraryMarcoFalke2019-11-061-1/+1
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT-
* Pass NodeContext, ConnMan, BanMan references more placesRussell Yanofsky2019-10-281-7/+5
| | | | So g_connman and g_banman globals can be removed next commit.
* doc: Explain QT_QPA_PLATFORM for gui testsMarcoFalke2019-10-011-1/+1
|
* tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift2019-06-261-1/+0
| | | | unused includes in tests
* Make reasoning about dependencies easier by not including unused dependenciespracticalswift2019-06-021-2/+0
|
* Merge #15788: test: Unify testing setups for fuzz, bench, and unit testsMarcoFalke2019-04-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | faf400077d scripted-diff: Bump copyright headers in test, bench (MarcoFalke) fa821904bf scripted-diff: Rename test_bitcoin to test/setup_common (MarcoFalke) fa8685d49e test: Use test_bitcoin setup in bench, Add test utils (MarcoFalke) 666696b673 test: Have segwit always active in (Basic)TestingSetup (MarcoFalke) Pull request description: Now that the fuzz tests can use the BasicTestingSetup [1], do the same for bench. Also move some duplicate code to a common "test/util" module. [1]: fuzz: Link BasicTestingSetup (shared with unit tests) #15504 ACKs for commit faf400: jonatack: ACK https://github.com/bitcoin/bitcoin/pull/15788/commits/faf400077d0144363c2dd24187431d958fb149a9 Tree-SHA512: 8ac5692e72cf50e460958f291643ae6b8bb04d5c1331ed50dce9eb4e9457e5a925144c532c42b360a26707e11eeece74aab27db8c76ab9a429b9dd7167e7cdc4
| * scripted-diff: Rename test_bitcoin to test/setup_commonMarcoFalke2019-04-111-1/+1
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT-
* | bitcoin-wallet tool: Drop MakeChain callsRussell Yanofsky2019-04-101-1/+1
|/ | | | | Pass null Chain interface pointer to CWallet. This is needed to drop libbitcoin_server dependency and avoid linking node code.
* wallet: Add lock annotation for mapAddressBookMarcoFalke2019-02-071-0/+1
|
* Pass chain and client variables where neededRussell Yanofsky2018-11-061-1/+3
| | | | | | | | | This commit does not change behavior. All it does is pass new function parameters. It is easiest to review this change with: git log -p -n1 -U0 --word-diff-regex=.
* wallet: Refactor to use WalletLocationJoão Barbosa2018-10-251-1/+1
|
* Merge #14527: qa: Revert "Make qt wallet test compatible with qt4"Wladimir J. van der Laan2018-10-201-2/+1
|\ | | | | | | | | | | | | | | | | | | fadffae17f31507a3d79a7b7f1cef71660767e0d Revert "Make qt wallet test compatible with qt4" (MarcoFalke) Pull request description: This removes the file added in #10098 Tree-SHA512: 4aa887ec02aec943f3d74f469c935acf57e43ddbea6f979bb37d3a14670571fa2276cf578e8978de92b5854d8b462f24e5e0addfb27b92fbedf90726eb5d985e
| * Revert "Make qt wallet test compatible with qt4"MarcoFalke2018-10-201-2/+1
| | | | | | | | This reverts commit e9a64615c8e18692a775765787f404266767260b.
* | Disable wallet and address book Qt tests on macOS minimal platformRussell Yanofsky2018-08-201-0/+12
|/ | | | | | | | macOS Qt minimal platform is frequently broken, and these are currently failing with Qt 5.11.1. The tests do pass when run on the full cocoa platform (with `test_bitcoin-qt -platform cocoa`).
* wallet: Use shared pointer to retain wallet instanceJoão Barbosa2018-05-221-9/+9
|
* [tests] [qt] Add tests for address book manipulation via EditAddressDialogJames O'Beirne2018-04-251-0/+143
Also modifies corresponding QT code to allow for use within test cases.