mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 17:53:04 +02:00
wallet: Move internal to be per key when importing
Instead of applying internal-ness to all keys being imported at the same time, apply it on a per key basis. So each key that is imported will carry with it whether it is for the change keypool.
This commit is contained in:
@@ -199,7 +199,7 @@ std::shared_ptr<CWallet> SetupLegacyWatchOnlyWallet(interfaces::Node& node, Test
|
||||
wallet->SetupLegacyScriptPubKeyMan();
|
||||
// Add watched key
|
||||
CPubKey pubKey = test.coinbaseKey.GetPubKey();
|
||||
bool import_keys = wallet->ImportPubKeys({pubKey.GetID()}, {{pubKey.GetID(), pubKey}} , /*key_origins=*/{}, /*add_keypool=*/false, /*internal=*/false, /*timestamp=*/1);
|
||||
bool import_keys = wallet->ImportPubKeys({{pubKey.GetID(), false}}, {{pubKey.GetID(), pubKey}} , /*key_origins=*/{}, /*add_keypool=*/false, /*timestamp=*/1);
|
||||
assert(import_keys);
|
||||
wallet->SetLastBlockProcessed(105, WITH_LOCK(node.context()->chainman->GetMutex(), return node.context()->chainman->ActiveChain().Tip()->GetBlockHash()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user