From 8e6fb6b5d180e8b59ff0c92e3e43ae969099b32d Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 26 Nov 2023 08:48:29 +0100 Subject: [PATCH] docs: add panics section (#5574) --- crates/primitives/src/block.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/primitives/src/block.rs b/crates/primitives/src/block.rs index 54e0085f53..9e703faaab 100644 --- a/crates/primitives/src/block.rs +++ b/crates/primitives/src/block.rs @@ -54,6 +54,11 @@ impl Block { } /// Transform into a [`BlockWithSenders`]. + /// + /// # Panics + /// + /// If the number of senders does not match the number of transactions in the block. + #[track_caller] pub fn with_senders(self, senders: Vec
) -> BlockWithSenders { assert_eq!(self.body.len(), senders.len(), "Unequal number of senders");