Addressing two specific bugs encountered during the wallet migration process, related to the address book, and improves the test coverage for it.
Bug 1: Non-Cloning of External ‘Send’ Records The external ‘send’ records were not being correctly cloned to all wallets.
Bug 2: Persistence of Empty Labels
As address book entries without associated db label records can be treated as change (the label field inside the CAddressBookData class is optional, nullopt labels make CAddressBookData ::IsChange() return true), we must persist empty labels during the migration process.
The user might have called setlabel with an "" string for an external address and that must be retained during migration.