Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Protryon committed Aug 26, 2021
1 parent a3f7e43 commit e3c6812
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions consensus/tests/consensus_sidechain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ mod consensus_sidechain {
// After block 1 is received, block 2 should be fetched from storage and added to the chain.
#[tokio::test]
async fn new_out_of_order() {
tracing_subscriber::fmt::init();
let consensus = snarkos_testing::sync::create_test_consensus().await;

let old_block_height = consensus.storage.canon().await.unwrap().block_height;
Expand Down
1 change: 1 addition & 0 deletions storage/src/storage/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pub enum ForkDescription {
Orphan,
}

#[derive(Debug)]
pub struct CanonData {
/// Current block height of canon
pub block_height: usize,
Expand Down
2 changes: 1 addition & 1 deletion storage/src/storage/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub trait SyncStorage {
/// Gets a tree structure representing all the descendents of [`block_hash`]
fn get_block_digest_tree(&mut self, block_hash: &Digest) -> Result<DigestTree> {
let children = self.get_block_children(block_hash)?;
if children.len() == 1 {
if children.is_empty() {
return Ok(DigestTree::Leaf(block_hash.clone()));
}
let mut out_children = Vec::with_capacity(children.len());
Expand Down
2 changes: 1 addition & 1 deletion testing/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with the snarkOS library. If not, see <https://www.gnu.org/licenses/>.

use snarkos_consensus::{ConsensusParameters, MemoryPool};
use snarkos_storage::{key_value::KeyValueStore, AsyncStorage, DynStorage, MemDb, VMBlock};
use snarkos_storage::VMBlock;
use snarkvm_algorithms::CRH;
use snarkvm_dpc::{
testnet1::instantiated::{Components, Testnet1Transaction},
Expand Down

0 comments on commit e3c6812

Please sign in to comment.