File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,14 @@ pub(crate) fn read_output_sweeper<K: KVStore + Send + Sync>(
230230 } )
231231}
232232
233- /// Read previously persisted spendable output information from the store.
233+ /// Read previously persisted spendable output information from the store and migrate to the
234+ /// upstreamed `OutputSweeper`.
235+ ///
236+ /// We first iterate all [`DeprecatedSpendableOutputInfo`]s and have them tracked by the new
237+ /// `OutputSweeper`. In order to be certain the initial output spends will happen in a single
238+ /// transaction (and safe on-chain fees), we batch them to happen at current height plus two
239+ /// blocks. Lastly, we remove the previously persisted data once we checked they are tracked and
240+ /// awaiting their initial spend at the correct height.
234241pub ( crate ) fn migrate_deprecated_spendable_outputs < K : KVStore + Sync + Send , L : Deref > (
235242 sweeper : Arc < Sweeper < K > > , kv_store : Arc < K > , logger : L ,
236243) -> Result < ( ) , std:: io:: Error >
You can’t perform that action at this time.
0 commit comments