Skip to content

Commit

Permalink
fix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Feb 14, 2022
1 parent 5f8e9d1 commit 81e2b8d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 24 deletions.
6 changes: 1 addition & 5 deletions explorer/src/api/graphql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,11 +1314,7 @@ impl VotePlanStatus {
return Ok(Self::vote_plan_from_data(vote_plan));
}

Err(ApiError::NotFound(format!(
"Vote plan with id {} not found",
vote_plan_id.to_string()
))
.into())
Err(ApiError::NotFound(format!("Vote plan with id {} not found", vote_plan_id)).into())
}

pub fn vote_plan_from_data(vote_plan: Arc<ExplorerVotePlan>) -> Self {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::testing::configuration::{get_available_port, get_explorer_app};
use crate::testing::configuration::get_explorer_app;

use self::{
client::GraphQlClient,
Expand Down Expand Up @@ -34,6 +34,8 @@ use std::path::Path;
use std::path::PathBuf;
use thiserror::Error;

use super::get_available_port;

#[derive(Error, Debug)]
pub enum ExplorerError {
#[error("graph client error")]
Expand Down
4 changes: 2 additions & 2 deletions testing/jormungandr-automation/src/jormungandr/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ impl JormungandrProcess {
.unwrap();

TimeEra::new(
(block_date.slot_id as u64).into(),
chain_time::Epoch(block_date.epoch),
(block_date.slot() as u64).into(),
chain_time::Epoch(block_date.epoch()),
self.block0_configuration
.blockchain_configuration
.slots_per_epoch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use jormungandr_lib::interfaces::ActiveSlotCoefficient;
use jortestkit::process::Wait;
use std::str::FromStr;
use std::time::Duration;
use thor::{StakePool, TransactionHash};

/// test checks if there is upto date schema
/// prereq:
Expand Down
14 changes: 0 additions & 14 deletions testing/jormungandr-integration-tests/src/jormungandr/fragments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub fn send_all_fragments() {
let receiver = thor::Wallet::default();
let sender = thor::Wallet::default();

dbg!("starting stake pool");

let (jormungandr, _) = startup::start_stake_pool(
&[sender.clone()],
&[receiver.clone()],
Expand All @@ -34,18 +32,11 @@ pub fn send_all_fragments() {

let fragment_sender = FragmentSender::from_with_setup(
jormungandr.block0_configuration(),
jormungandr.genesis_block_hash(),
jormungandr.fees(),
jormungandr.default_block_date_generator(),
FragmentSenderSetup::no_verify(),
);

dbg!("fragment sender built");

let time_era = jormungandr.time_era();

dbg!("time era");

let mut fragment_generator = FragmentGenerator::new(
sender,
receiver,
Expand All @@ -57,17 +48,12 @@ pub fn send_all_fragments() {
fragment_sender,
);

dbg!("generating fragments");

fragment_generator.prepare(BlockDate::new(1, 0));

dbg!("waiting for epoch");

time::wait_for_epoch(2, jormungandr.rest());

let mem_checks: Vec<MemPoolCheck> = fragment_generator.send_all().unwrap();

dbg!("wait and verify");
FragmentVerifier::wait_and_verify_all_are_in_block(
Duration::from_secs(2),
mem_checks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use hersir::builder::SpawnParams;
use hersir::builder::Topology;
use jormungandr_automation::testing::time;
use jormungandr_lib::interfaces::BlockDate;
use jormungandr_lib::interfaces::Explorer;
use thor::FragmentSender;
const LEADER_1: &str = "Leader_1";
const LEADER_2: &str = "Leader_2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use hersir::builder::SpawnParams;
use hersir::builder::Topology;
use jormungandr_automation::testing::time;
use jormungandr_lib::interfaces::BlockDate;
use jormungandr_lib::interfaces::Explorer;
use thor::FragmentSender;
const LEADER_1: &str = "Leader_1";
const LEADER_2: &str = "Leader_2";
Expand Down

0 comments on commit 81e2b8d

Please sign in to comment.