Skip to content

Commit 73ad037

Browse files
committed
fix
1 parent 29a3ee4 commit 73ad037

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rust/vote-tx-v2/src/decoding.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ impl Decode<'_, ()> for GeneralizedTx {
3636
let signature = {
3737
let sign_bytes = read_cbor_bytes(d)
3838
.map_err(|_| minicbor::decode::Error::message("missing `signature` field"))?;
39-
coset::CoseSign::from_slice(&sign_bytes).map_err(|_| {
39+
let mut sign = coset::CoseSign::from_slice(&sign_bytes).map_err(|_| {
4040
minicbor::decode::Error::message("`signature` must be COSE_Sign encoded object")
41-
})?
41+
})?;
42+
// We dont need to hold the original encoded data of the COSE protected header
43+
sign.protected.original_data = None;
44+
sign
4245
};
4346

4447
Ok(Self { tx_body, signature })

0 commit comments

Comments
 (0)