Skip to main content

write_decision_committing_if_written

Function write_decision_committing_if_written 

Source
pub(crate) async fn write_decision_committing_if_written(
    tx: Transaction<'_, Postgres>,
    claim: &ClaimedRegistration,
    decision: Decision<'_>,
    audit: &ExchangeAudit,
) -> CreditRegistrationResult<Applied>
Expand description

write_decision as the last write of tx, committing it only if the decision landed, so everything tx wrote for a row that moved on meanwhile rolls back with it.