Skip to main content

migrate_to_v3

Function migrate_to_v3 

Source
pub async fn migrate_to_v3(
    ctx: ServerModuleDbMigrationFnContext<'_, Wallet>,
) -> Result<(), Error>
Expand description

Migrate to v3, backfilling the change outputs of all peg-outs made so far.

Change outputs pay to the peg-in descriptor and so are indistinguishable from user deposits; going forward they are recorded as claimed when the peg-out is created, but transactions built before that change have no such record. Every peg-out we ever made is still listed under PegOutBitcoinTransaction, which is never removed, so the set is recoverable in full.