File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1940,11 +1940,13 @@ std::optional<MigrationData> LegacyScriptPubKeyMan::MigrateToDescriptor()
19401940 desc_spk_man->TopUp ();
19411941 auto desc_spks = desc_spk_man->GetScriptPubKeys ();
19421942
1943- // Remove the scriptPubKeys from our current set
1943+ // Erase every script form combo just produced from the tracking set.
1944+ // Legacy GetScriptPubKeys only enumerates P2PK and P2PKH for loose
1945+ // keys (Dash has no segwit, so LearnRelatedScripts never inserts the
1946+ // P2SH-P2PKH form into mapScripts), so the third script combo emits
1947+ // is not in `spks` — only erase what's there.
19441948 for (const CScript& spk : desc_spks) {
1945- size_t erased = spks.erase (spk);
1946- assert (erased == 1 );
1947- assert (IsMine (spk) == ISMINE_SPENDABLE);
1949+ spks.erase (spk);
19481950 }
19491951
19501952 out.desc_spkms .push_back (std::move (desc_spk_man));
You can’t perform that action at this time.
0 commit comments