Lock with cs_main inside gtests that call chainActive.Height()
This commit is contained in:
parent
1be7250db9
commit
9c3d5b378b
|
@ -185,7 +185,7 @@ TEST(WalletTests, FindUnspentSproutNotes) {
|
||||||
auto consensusParams = RegtestActivateSapling();
|
auto consensusParams = RegtestActivateSapling();
|
||||||
|
|
||||||
CWallet wallet;
|
CWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
auto sk = libzcash::SproutSpendingKey::random();
|
auto sk = libzcash::SproutSpendingKey::random();
|
||||||
wallet.AddSproutSpendingKey(sk);
|
wallet.AddSproutSpendingKey(sk);
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ TEST(WalletTests, GetConflictedSaplingNotes) {
|
||||||
auto consensusParams = RegtestActivateSapling();
|
auto consensusParams = RegtestActivateSapling();
|
||||||
|
|
||||||
TestWallet wallet;
|
TestWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
|
|
||||||
// Generate Sapling address
|
// Generate Sapling address
|
||||||
auto sk = GetTestMasterSaplingSpendingKey();
|
auto sk = GetTestMasterSaplingSpendingKey();
|
||||||
|
@ -759,7 +759,7 @@ TEST(WalletTests, GetConflictedSaplingNotes) {
|
||||||
|
|
||||||
TEST(WalletTests, SproutNullifierIsSpent) {
|
TEST(WalletTests, SproutNullifierIsSpent) {
|
||||||
CWallet wallet;
|
CWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
|
|
||||||
auto sk = libzcash::SproutSpendingKey::random();
|
auto sk = libzcash::SproutSpendingKey::random();
|
||||||
wallet.AddSproutSpendingKey(sk);
|
wallet.AddSproutSpendingKey(sk);
|
||||||
|
@ -802,7 +802,7 @@ TEST(WalletTests, SaplingNullifierIsSpent) {
|
||||||
auto consensusParams = RegtestActivateSapling();
|
auto consensusParams = RegtestActivateSapling();
|
||||||
|
|
||||||
TestWallet wallet;
|
TestWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
|
|
||||||
// Generate dummy Sapling address
|
// Generate dummy Sapling address
|
||||||
auto sk = GetTestMasterSaplingSpendingKey();
|
auto sk = GetTestMasterSaplingSpendingKey();
|
||||||
|
@ -887,7 +887,7 @@ TEST(WalletTests, NavigateFromSaplingNullifierToNote) {
|
||||||
auto consensusParams = RegtestActivateSapling();
|
auto consensusParams = RegtestActivateSapling();
|
||||||
|
|
||||||
TestWallet wallet;
|
TestWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
|
|
||||||
// Generate dummy Sapling address
|
// Generate dummy Sapling address
|
||||||
auto sk = GetTestMasterSaplingSpendingKey();
|
auto sk = GetTestMasterSaplingSpendingKey();
|
||||||
|
@ -1010,7 +1010,7 @@ TEST(WalletTests, SpentSaplingNoteIsFromMe) {
|
||||||
auto consensusParams = RegtestActivateSapling();
|
auto consensusParams = RegtestActivateSapling();
|
||||||
|
|
||||||
TestWallet wallet;
|
TestWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
|
|
||||||
// Generate Sapling address
|
// Generate Sapling address
|
||||||
auto sk = GetTestMasterSaplingSpendingKey();
|
auto sk = GetTestMasterSaplingSpendingKey();
|
||||||
|
@ -1793,7 +1793,7 @@ TEST(WalletTests, UpdatedSaplingNoteData) {
|
||||||
auto consensusParams = RegtestActivateSapling();
|
auto consensusParams = RegtestActivateSapling();
|
||||||
|
|
||||||
TestWallet wallet;
|
TestWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
|
|
||||||
auto m = GetTestMasterSaplingSpendingKey();
|
auto m = GetTestMasterSaplingSpendingKey();
|
||||||
|
|
||||||
|
@ -1936,7 +1936,7 @@ TEST(WalletTests, MarkAffectedSaplingTransactionsDirty) {
|
||||||
auto consensusParams = RegtestActivateSapling();
|
auto consensusParams = RegtestActivateSapling();
|
||||||
|
|
||||||
TestWallet wallet;
|
TestWallet wallet;
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK2(cs_main, wallet.cs_wallet);
|
||||||
|
|
||||||
// Generate Sapling address
|
// Generate Sapling address
|
||||||
auto sk = GetTestMasterSaplingSpendingKey();
|
auto sk = GetTestMasterSaplingSpendingKey();
|
||||||
|
|
Loading…
Reference in New Issue