Skip to main content

unlock_proposal_inputs

Function unlock_proposal_inputs 

Source
pub fn unlock_proposal_inputs<DbT, FeeRuleT, NoteRef>(
    wallet_db: &mut DbT,
    proposal: &Proposal<FeeRuleT, NoteRef>,
    owner: LockOwner,
) -> Result<(), <DbT as WalletRead>::Error>
where DbT: WalletWrite,
Expand description

Unlocks all inputs selected by the given proposal, reversing the locks acquired when the proposal was created with a LockRequest under the same owner.

This is useful when a proposal is rejected or abandoned after its inputs were locked, so that the outputs become available for selection and balance computation once again. Because unlocking is scoped to owner, inputs that are not locked, or whose locks are held by a different owner (for example a concurrently-created proposal), are left unchanged.