From 7bc540a70dd1cb9f9a05261acb623b0d774983dc Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Mon, 11 Mar 2024 20:20:15 -0400 Subject: [PATCH] =?UTF-8?q?mock-consensus:=20=F0=9F=91=B7=20block=20builde?= =?UTF-8?q?r=20can=20`add=5Ftx`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/test/mock-consensus/src/block.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/test/mock-consensus/src/block.rs b/crates/test/mock-consensus/src/block.rs index 363372fac6..dafa729f62 100644 --- a/crates/test/mock-consensus/src/block.rs +++ b/crates/test/mock-consensus/src/block.rs @@ -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) -> 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 }