v30.3-roots.1 · Commit 18: [PATCH 18/68] test(qt): lock wallet transaction assertions
src/qt/test/wallettests.cpp
Before: src/qt/test/wallettests.cpp · After: src/qt/test/wallettests.cpp
File metadata
index a477110f9ae62f0d0b236850d143289323e9ba75..c9a65d995bc015a858927d6b205b15d0caf518d2 100644
Download original patch · Release notes
Diff rows 1–24 of 24. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/qt/test/wallettests.cpp
CHANGED
|
@@ -297,8 +297,11 @@ void TestGUI(interfaces::Node& node, const std::shared_ptr<CWallet>& wallet)
|
|
| 297 |
Txid txid1 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 5 * COIN, /*rbf=*/false, QMessageBox::Yes, &no_rbf_confirmation);
|
| 298 |
QString rbf_confirmation;
|
| 299 |
Txid txid2 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 10 * COIN, /*rbf=*/true, QMessageBox::Yes, &rbf_confirmation);
|
| 300 |
-
QVERIFY(!SignalsOptInRBF(*wallet->mapWallet.at(txid1).tx));
|
| 301 |
-
QVERIFY(SignalsOptInRBF(*wallet->mapWallet.at(txid2).tx));
|
|
|
|
|
|
|
|
|
|
| 302 |
QVERIFY(no_rbf_confirmation.contains("Not signalling Replace-By-Fee, BIP-125."));
|
| 303 |
QVERIFY(rbf_confirmation.contains("signals Replace-By-Fee (BIP-125)"));
|
| 304 |
|
|
@@ -308,7 +311,10 @@ void TestGUI(interfaces::Node& node, const std::shared_ptr<CWallet>& wallet)
|
|
| 308 |
QVERIFY(default_rbf_dialog.findChild<QCheckBox*>("optInRBF")->isChecked());
|
| 309 |
QString default_on_override_confirmation;
|
| 310 |
Txid txid3 = SendCoins(*wallet.get(), default_rbf_dialog, PKHash(), COIN, /*rbf=*/false, QMessageBox::Yes, &default_on_override_confirmation);
|
| 311 |
-
QVERIFY(!SignalsOptInRBF(*wallet->mapWallet.at(txid3).tx));
|
|
|
|
|
|
|
|
|
|
| 312 |
QVERIFY(default_on_override_confirmation.contains("Not signalling Replace-By-Fee, BIP-125."));
|
| 313 |
// Transaction table model updates on a QueuedConnection, so process events to ensure it's updated.
|
| 314 |
qApp->processEvents();
|
|
|
|
| 297 |
Txid txid1 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 5 * COIN, /*rbf=*/false, QMessageBox::Yes, &no_rbf_confirmation);
|
| 298 |
QString rbf_confirmation;
|
| 299 |
Txid txid2 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 10 * COIN, /*rbf=*/true, QMessageBox::Yes, &rbf_confirmation);
|
| 300 |
+
{
|
| 301 |
+
LOCK(wallet->cs_wallet);
|
| 302 |
+
QVERIFY(!SignalsOptInRBF(*wallet->mapWallet.at(txid1).tx));
|
| 303 |
+
QVERIFY(SignalsOptInRBF(*wallet->mapWallet.at(txid2).tx));
|
| 304 |
+
}
|
| 305 |
QVERIFY(no_rbf_confirmation.contains("Not signalling Replace-By-Fee, BIP-125."));
|
| 306 |
QVERIFY(rbf_confirmation.contains("signals Replace-By-Fee (BIP-125)"));
|
| 307 |
|
|
|
|
| 311 |
QVERIFY(default_rbf_dialog.findChild<QCheckBox*>("optInRBF")->isChecked());
|
| 312 |
QString default_on_override_confirmation;
|
| 313 |
Txid txid3 = SendCoins(*wallet.get(), default_rbf_dialog, PKHash(), COIN, /*rbf=*/false, QMessageBox::Yes, &default_on_override_confirmation);
|
| 314 |
+
{
|
| 315 |
+
LOCK(wallet->cs_wallet);
|
| 316 |
+
QVERIFY(!SignalsOptInRBF(*wallet->mapWallet.at(txid3).tx));
|
| 317 |
+
}
|
| 318 |
QVERIFY(default_on_override_confirmation.contains("Not signalling Replace-By-Fee, BIP-125."));
|
| 319 |
// Transaction table model updates on a QueuedConnection, so process events to ensure it's updated.
|
| 320 |
qApp->processEvents();
|