You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the following test the block.rs, it should work:
#[cfg(test)]
mod test {
use super::*;
use crate::blocks::genesis_block::get_genesis_block;
use crate::consensus::{ConsensusDecoding};
use tari_common::configuration::Network;
#[test]
fn block_encode_decode(){
let block = get_genesis_block(Network::LocalNet).block().clone();
let mut block_bytes = Vec::new();
block.consensus_encode(&mut block_bytes).unwrap();
let decoded_block = Block::consensus_decode(&mut block_bytes.as_slice()).unwrap();
assert_eq!(block, decoded_block);
}
}
The text was updated successfully, but these errors were encountered:
Add the following test the block.rs, it should work:
The text was updated successfully, but these errors were encountered: