From debcce6a0388bf89d68e04ce2f2a55038a081683 Mon Sep 17 00:00:00 2001 From: DanGould Date: Mon, 9 Jan 2023 23:10:07 -0500 Subject: [PATCH] Improve magic bytes push performance --- bitcoin/src/psbt/serialize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/src/psbt/serialize.rs b/bitcoin/src/psbt/serialize.rs index ddbe2ec8..61019f62 100644 --- a/bitcoin/src/psbt/serialize.rs +++ b/bitcoin/src/psbt/serialize.rs @@ -53,7 +53,7 @@ impl PartiallySignedTransaction { let mut buf: Vec = Vec::new(); // - buf.extend(b"psbt"); + buf.extend_from_slice(b"psbt"); buf.push(0xff_u8);