diff options
| author | Ross Nicoll <[email protected]> | 2021-03-03 21:22:15 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2021-05-20 12:02:35 +0100 |
| commit | 3f8289a113ad2fb629c787528c809aa7d5b91610 (patch) | |
| tree | 073b9f822df735b78b18cc1de6b40991f568f07d /src/qt | |
| parent | Update miner confirmation window (diff) | |
| download | discoin-3f8289a113ad2fb629c787528c809aa7d5b91610.tar.xz discoin-3f8289a113ad2fb629c787528c809aa7d5b91610.zip | |
Dogecoin: Update coinbase maturity
* 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.
Diffstat (limited to 'src/qt')
| -rw-r--r-- | src/qt/test/addressbooktests.cpp | 2 | ||||
| -rw-r--r-- | src/qt/test/wallettests.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/qt/test/addressbooktests.cpp b/src/qt/test/addressbooktests.cpp index 35fcb2b0c..9dd438595 100644 --- a/src/qt/test/addressbooktests.cpp +++ b/src/qt/test/addressbooktests.cpp @@ -59,7 +59,7 @@ void EditAddressAndSubmit( */ void TestAddAddressesToSendBook(interfaces::Node& node) { - TestChain100Setup test; + TestChain240Setup test; node.setContext(&test.m_node); std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), "", CreateMockWalletDatabase()); wallet->SetupLegacyScriptPubKeyMan(); diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index d6d2d0e3d..9fcfb081c 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -134,7 +134,7 @@ void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, st void TestGUI(interfaces::Node& node) { // Set up wallet and chain with 105 blocks (5 mature blocks for spending). - TestChain100Setup test; + TestChain240Setup test; for (int i = 0; i < 5; ++i) { test.CreateAndProcessBlock({}, GetScriptForRawPubKey(test.coinbaseKey.GetPubKey())); } @@ -147,7 +147,7 @@ void TestGUI(interfaces::Node& node) LOCK2(wallet->cs_wallet, spk_man->cs_KeyStore); wallet->SetAddressBook(GetDestinationForKey(test.coinbaseKey.GetPubKey(), wallet->m_default_address_type), "", "receive"); spk_man->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); - wallet->SetLastBlockProcessed(105, ::ChainActive().Tip()->GetBlockHash()); + wallet->SetLastBlockProcessed(245, ::ChainActive().Tip()->GetBlockHash()); } { WalletRescanReserver reserver(*wallet); @@ -183,10 +183,10 @@ void TestGUI(interfaces::Node& node) // Send two transactions, and verify they are added to transaction list. TransactionTableModel* transactionTableModel = walletModel.getTransactionTableModel(); - QCOMPARE(transactionTableModel->rowCount({}), 105); + QCOMPARE(transactionTableModel->rowCount({}), 245); uint256 txid1 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 5 * COIN, false /* rbf */); uint256 txid2 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 10 * COIN, true /* rbf */); - QCOMPARE(transactionTableModel->rowCount({}), 107); + QCOMPARE(transactionTableModel->rowCount({}), 247); QVERIFY(FindTx(*transactionTableModel, txid1).isValid()); QVERIFY(FindTx(*transactionTableModel, txid2).isValid()); |