We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29a3ee4 commit 73ad037Copy full SHA for 73ad037
rust/vote-tx-v2/src/decoding.rs
@@ -36,9 +36,12 @@ impl Decode<'_, ()> for GeneralizedTx {
36
let signature = {
37
let sign_bytes = read_cbor_bytes(d)
38
.map_err(|_| minicbor::decode::Error::message("missing `signature` field"))?;
39
- coset::CoseSign::from_slice(&sign_bytes).map_err(|_| {
+ let mut sign = coset::CoseSign::from_slice(&sign_bytes).map_err(|_| {
40
minicbor::decode::Error::message("`signature` must be COSE_Sign encoded object")
41
- })?
+ })?;
42
+ // We dont need to hold the original encoded data of the COSE protected header
43
+ sign.protected.original_data = None;
44
+ sign
45
};
46
47
Ok(Self { tx_body, signature })
0 commit comments