parent
4797a75586
commit
3523b8e117
|
@ -8,12 +8,12 @@ macro_rules! impl_consensus_encoding {
|
||||||
($thing:ident, $($field:ident),+) => (
|
($thing:ident, $($field:ident),+) => (
|
||||||
impl $crate::consensus::Encodable for $thing {
|
impl $crate::consensus::Encodable for $thing {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn consensus_encode<R: $crate::io::Write + ?Sized>(
|
fn consensus_encode<W: $crate::io::Write + ?Sized>(
|
||||||
&self,
|
&self,
|
||||||
r: &mut R,
|
w: &mut W,
|
||||||
) -> core::result::Result<usize, $crate::io::Error> {
|
) -> core::result::Result<usize, $crate::io::Error> {
|
||||||
let mut len = 0;
|
let mut len = 0;
|
||||||
$(len += self.$field.consensus_encode(r)?;)+
|
$(len += self.$field.consensus_encode(w)?;)+
|
||||||
Ok(len)
|
Ok(len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue