use impl_serde_byte_array

This commit is contained in:
Jude Nelson
2020-07-09 13:25:04 -04:00
parent d35c577a3c
commit 5611e6db13

View File

@@ -94,12 +94,12 @@ pub const STACKS_MICROBLOCK_VERSION: u8 = 0;
pub const MAX_TRANSACTION_LEN: u32 = MAX_MESSAGE_LEN; // TODO: shrink
pub const MAX_BLOCK_LEN: u32 = MAX_MESSAGE_LEN; // TODO: shrink
#[derive(Serialize, Deserialize)]
pub struct StacksBlockId(pub [u8; 32]);
impl_array_newtype!(StacksBlockId, u8, 32);
impl_array_hexstring_fmt!(StacksBlockId);
impl_byte_array_newtype!(StacksBlockId, u8, 32);
impl_byte_array_from_column!(StacksBlockId);
impl_byte_array_serde!(StacksBlockId);
impl From<StacksAddress> for StandardPrincipalData {
fn from(addr: StacksAddress) -> StandardPrincipalData {