Skip to content

Commit ed80471

Browse files
mattsseampcode-com
andauthored
fix(consensus): mark tx_mut as hidden with invalidation warning (#3608)
Amp-Thread-ID: https://ampcode.com/threads/T-019c0135-70cf-710a-8324-f38bb9eeb676 Co-authored-by: Amp <amp@ampcode.com>
1 parent 1a62d8a commit ed80471

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/consensus/src/signed.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ impl<T, Sig> Signed<T, Sig> {
5252
}
5353

5454
/// Returns a mutable reference to the transaction.
55+
///
56+
/// # Warning
57+
///
58+
/// Modifying the transaction structurally invalidates the signature and hash.
59+
#[doc(hidden)]
5560
pub const fn tx_mut(&mut self) -> &mut T {
5661
&mut self.tx
5762
}

0 commit comments

Comments
 (0)