mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-09 20:59:38 +02:00
Merge bitcoin/bitcoin#29367: wallet: Set descriptors flag after migrating blank wallets
3904123da954f9ebd905de4129aec9f9bab9efc7 tests: Test that descriptors flag is set for migrated blank wallets (Ava Chow) 072d506240f6c39387b2edd4421818cc914c0912 wallet: Make sure that the descriptors flag is set for blank wallets (Ava Chow) Pull request description: While rebasing #28710 after #28976 was merged, I realized that although blank wallets were being moved to sqlite, `WALLET_FLAG_DESCRIPTORS` was not being set so those blank wallets would still continue to be treated as legacy wallets. To fix that, just set the descriptor flags for blank wallets. Also added a test to catch this. ACKs for top commit: epiccurious: Tested ACK 3904123da954f9ebd905de4129aec9f9bab9efc7. delta1: tested ACK 3904123da954f9ebd905de4129aec9f9bab9efc7 ryanofsky: Code review ACK 3904123da954f9ebd905de4129aec9f9bab9efc7 murchandamus: code review ACK 3904123da954f9ebd905de4129aec9f9bab9efc7 Tree-SHA512: 9f6fe9c1899ca387ab909b1bb6956cd6bc5acbf941686ddc6c061f9b1ceec2cc9d009ff472486fc86e963f6068f0e2f1ae96282e7c630193797a9734c4f424ab
This commit is contained in:
commit
93e10cab5d
@ -4257,6 +4257,9 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(const std::string& walle
|
||||
success = local_wallet->IsWalletFlagSet(WALLET_FLAG_BLANK_WALLET);
|
||||
if (!success) {
|
||||
success = DoMigration(*local_wallet, context, error, res);
|
||||
} else {
|
||||
// Make sure that descriptors flag is actually set
|
||||
local_wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -881,7 +881,7 @@ class WalletMigrationTest(BitcoinTestFramework):
|
||||
assert_equal(wallet.getwalletinfo()["blank"], True)
|
||||
wallet.migratewallet()
|
||||
assert_equal(wallet.getwalletinfo()["blank"], True)
|
||||
|
||||
assert_equal(wallet.getwalletinfo()["descriptors"], True)
|
||||
|
||||
def test_avoidreuse(self):
|
||||
self.log.info("Test that avoidreuse persists after migration")
|
||||
|
Loading…
x
Reference in New Issue
Block a user