@@ -354,7 +354,7 @@ bool LoadKey(CWallet* pwallet, DataStream& ssKey, DataStream& ssValue, std::stri
354354 strErr = " Error reading wallet database: CPrivKey corrupt" ;
355355 return false ;
356356 }
357- if (!pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadKey (key, vchPubKey))
357+ if (!pwallet->GetOrCreateLegacyDataSPKM ()->LoadKey (key, vchPubKey))
358358 {
359359 strErr = " Error reading wallet database: LegacyDataSPKM::LoadKey failed" ;
360360 return false ;
@@ -393,7 +393,7 @@ bool LoadCryptedKey(CWallet* pwallet, DataStream& ssKey, DataStream& ssValue, st
393393 }
394394 }
395395
396- if (!pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadCryptedKey (vchPubKey, vchPrivKey, checksum_valid))
396+ if (!pwallet->GetOrCreateLegacyDataSPKM ()->LoadCryptedKey (vchPubKey, vchPrivKey, checksum_valid))
397397 {
398398 strErr = " Error reading wallet database: LegacyDataSPKM::LoadCryptedKey failed" ;
399399 return false ;
@@ -440,7 +440,7 @@ bool LoadHDChain(CWallet* pwallet, DataStream& ssValue, std::string& strErr)
440440 try {
441441 CHDChain chain;
442442 ssValue >> chain;
443- pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadHDChain (chain);
443+ pwallet->GetOrCreateLegacyDataSPKM ()->LoadHDChain (chain);
444444 } catch (const std::exception& e) {
445445 if (strErr.empty ()) {
446446 strErr = e.what ();
@@ -584,7 +584,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch,
584584 key >> hash;
585585 CScript script;
586586 value >> script;
587- if (!pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadCScript (script))
587+ if (!pwallet->GetOrCreateLegacyDataSPKM ()->LoadCScript (script))
588588 {
589589 strErr = " Error reading wallet database: LegacyDataSPKM::LoadCScript failed" ;
590590 return DBErrors::NONCRITICAL_ERROR;
@@ -607,7 +607,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch,
607607 key >> vchPubKey;
608608 CKeyMetadata keyMeta;
609609 value >> keyMeta;
610- pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadKeyMetadata (vchPubKey.GetID (), keyMeta);
610+ pwallet->GetOrCreateLegacyDataSPKM ()->LoadKeyMetadata (vchPubKey.GetID (), keyMeta);
611611
612612 // Extract some CHDChain info from this metadata if it has any
613613 if (keyMeta.nVersion >= CKeyMetadata::VERSION_WITH_HDDATA && !keyMeta.hd_seed_id .IsNull () && keyMeta.hdKeypath .size () > 0 ) {
@@ -674,7 +674,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch,
674674
675675 // Set inactive chains
676676 if (!hd_chains.empty ()) {
677- LegacyScriptPubKeyMan * legacy_spkm = pwallet->GetLegacyScriptPubKeyMan ();
677+ LegacyDataSPKM * legacy_spkm = pwallet->GetLegacyDataSPKM ();
678678 if (legacy_spkm) {
679679 for (const auto & [hd_seed_id, chain] : hd_chains) {
680680 if (hd_seed_id != legacy_spkm->GetHDChain ().seed_id ) {
@@ -695,7 +695,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch,
695695 uint8_t fYes ;
696696 value >> fYes ;
697697 if (fYes == ' 1' ) {
698- pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadWatchOnly (script);
698+ pwallet->GetOrCreateLegacyDataSPKM ()->LoadWatchOnly (script);
699699 }
700700 return DBErrors::LOAD_OK;
701701 });
@@ -708,7 +708,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch,
708708 key >> script;
709709 CKeyMetadata keyMeta;
710710 value >> keyMeta;
711- pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadScriptMetadata (CScriptID (script), keyMeta);
711+ pwallet->GetOrCreateLegacyDataSPKM ()->LoadScriptMetadata (CScriptID (script), keyMeta);
712712 return DBErrors::LOAD_OK;
713713 });
714714 result = std::max (result, watch_meta_res.m_result );
@@ -720,7 +720,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch,
720720 key >> nIndex;
721721 CKeyPool keypool;
722722 value >> keypool;
723- pwallet->GetOrCreateLegacyScriptPubKeyMan ()->LoadKeyPool (nIndex, keypool);
723+ pwallet->GetOrCreateLegacyDataSPKM ()->LoadKeyPool (nIndex, keypool);
724724 return DBErrors::LOAD_OK;
725725 });
726726 result = std::max (result, pool_res.m_result );
@@ -763,7 +763,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch,
763763
764764 // nTimeFirstKey is only reliable if all keys have metadata
765765 if (pwallet->IsLegacy () && (key_res.m_records + ckey_res.m_records + watch_script_res.m_records ) != (keymeta_res.m_records + watch_meta_res.m_records )) {
766- auto spk_man = pwallet->GetOrCreateLegacyScriptPubKeyMan ();
766+ auto spk_man = pwallet->GetLegacyScriptPubKeyMan ();
767767 if (spk_man) {
768768 LOCK (spk_man->cs_KeyStore );
769769 spk_man->UpdateTimeFirstKey (1 );
0 commit comments