Skip to content

Commit 5a55873

Browse files
committed
implement Strict(Serialize|Deserialize) for CompressedPk
1 parent a439ba5 commit 5a55873

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

consensus/src/pubkeys.rs

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use strict_encoding::{
2929
DecodeError, ReadStruct, ReadTuple, StrictDecode, StrictEncode, TypedRead, TypedWrite,
3030
WriteStruct,
3131
};
32+
use strict_types::{StrictDeserialize, StrictSerialize};
3233

3334
use crate::LIB_NAME_BITCOIN;
3435

@@ -64,6 +65,9 @@ pub enum InvalidPubkey<const LEN: usize> {
6465
)]
6566
pub struct CompressedPk(PublicKey);
6667

68+
impl StrictSerialize for CompressedPk {}
69+
impl StrictDeserialize for CompressedPk {}
70+
6771
impl CompressedPk {
6872
fn dumb() -> Self { Self(PublicKey::from_slice(&[2u8; 33]).unwrap()) }
6973

0 commit comments

Comments
 (0)