graph LR
Funding -- funding transaction is rejected --> Failure
Funding -- funding transaction is accepted --> Funded
Funded -- payment attempt expires --> Refunding
Funded -- gateway cancels payment attempt --> Refunding
Funded -- payment is confirmed --> Success
The reason for this migration is to make the TransactionError available in the Rejected state. While we are at it we remove the operation state wrapper as operation ids will in the future be tracked outside of the state machines and this is the only place where its used anyways. Furthermore, we make the transaction available in all states in case we need it in the future and remove the deprectaed NonRetryableError state.
OperationState<TxSubmissionStates> {
operation_id: OperationId,
state: TxSubmissionStates,
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bitcoin_hashes::{sha256, Hash, HashEngine}; | |
use bls12_381::{G1Affine, G1Projective, Scalar}; | |
use core::array; | |
use ff::Field; | |
use group::Curve; | |
use rand::{thread_rng, SeedableRng}; | |
use rand_chacha::ChaChaRng; | |
use std::io::Write; | |
fn prove<const N: usize, const M: usize, const S: usize>( |