miden_client/transaction/batch/
error.rs1use miden_protocol::block::BlockNumber;
2use miden_protocol::note::NoteId;
3
4use crate::store::StoreError;
5use crate::transaction::TransactionStoreUpdateError;
6
7#[derive(Debug, thiserror::Error)]
9pub enum BatchBuilderError {
10 #[error("input note {0} is already consumed by an earlier transaction in this batch")]
13 DuplicateInputNote(NoteId),
14
15 #[error("batch is empty — push at least one transaction before submitting")]
17 Empty,
18
19 #[error(
23 "batch was accepted at block {block_num} but building store updates failed; sync_state to reconcile"
24 )]
25 BatchSubmittedButUpdateBuildFailed {
26 block_num: BlockNumber,
27 #[source]
28 source: TransactionStoreUpdateError,
29 },
30
31 #[error(
35 "batch was accepted at block {block_num} but applying to the store failed; sync_state to reconcile"
36 )]
37 BatchSubmittedButApplyFailed {
38 block_num: BlockNumber,
39 #[source]
40 source: StoreError,
41 },
42}