Skip to content

Commit

Permalink
mock-consensus: 👷 block builder can add_tx
Browse files Browse the repository at this point in the history
  • Loading branch information
cratelyn committed Mar 12, 2024
1 parent 7fd9fd4 commit 7bc540a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/test/mock-consensus/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ impl<'e, C> Builder<'e, C> {
Self { data, ..self }
}

/// Appends the given tx to this block's data.
pub fn add_tx(mut self, tx: Vec<u8>) -> Self {
self.data.push(tx);
self
}

/// Sets the evidence [`List`][evidence::List] for this block.
pub fn with_evidence(self, evidence: evidence::List) -> Self {
Self { evidence, ..self }
Expand Down

0 comments on commit 7bc540a

Please sign in to comment.