diff --git a/base_layer/core/src/proof_of_work/monero_rx/fixed_array.rs b/base_layer/core/src/proof_of_work/monero_rx/fixed_array.rs index c27495bffe..4eb808e11a 100644 --- a/base_layer/core/src/proof_of_work/monero_rx/fixed_array.rs +++ b/base_layer/core/src/proof_of_work/monero_rx/fixed_array.rs @@ -136,8 +136,7 @@ impl ConsensusDecoding for FixedByteArray { impl ConsensusEncoding for FixedByteArray { fn consensus_encode(&self, writer: &mut W) -> Result<(), io::Error> { - writer.write_all(&[self.len][..])?; - writer.write_all(&self.elems[0..self.len()])?; + self.as_slice().consensus_decode(writer)?; Ok(()) } }