Skip to content

Commit

Permalink
regen schema without treasury for now
Browse files Browse the repository at this point in the history
I'm not completely sure if we should re-implement this in the explorer
too, or if we should implement it in rest only, so for now this changes
it to a TODO
  • Loading branch information
ecioppettini committed Jun 8, 2021
1 parent 5ee8e0c commit 5de823e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 116 deletions.
Expand Up @@ -118,19 +118,7 @@ pub fn jcli_e2e_flow_private_vote() {

alice.confirm_transaction();

let rewards_before = jormungandr
.explorer()
.last_block()
.unwrap()
.data
.unwrap()
.tip
.block
.treasury
.unwrap()
.rewards
.parse::<u64>()
.unwrap();
let rewards_before: u64 = unimplemented!("treasury query not supported by external explorer");

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

Expand Down Expand Up @@ -270,19 +258,7 @@ pub fn jcli_e2e_flow_private_vote() {

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

let rewards_after = jormungandr
.explorer()
.last_block()
.unwrap()
.data
.unwrap()
.tip
.block
.treasury
.unwrap()
.rewards
.parse::<u64>()
.unwrap();
let rewards_after: u64 = unimplemented!("treasury query not supported by external explorer");

// We want to make sure that our small rewards increase is reflexed in current rewards amount
assert!(
Expand Down
Expand Up @@ -182,19 +182,7 @@ pub fn test_vote_flow_bft() {
.send_vote_cast(&mut bob, &vote_plan, 0, &favorable_choice, &jormungandr)
.unwrap();

let rewards_before = jormungandr
.explorer()
.last_block()
.unwrap()
.data
.unwrap()
.tip
.block
.treasury
.unwrap()
.rewards
.parse::<u64>()
.unwrap();
let rewards_before: u64 = unimplemented!("treasury query not supported by external explorer");

wait_for_epoch(1, jormungandr.rest());

Expand All @@ -214,19 +202,7 @@ pub fn test_vote_flow_bft() {
jormungandr.rest().vote_plan_statuses().unwrap(),
);

let rewards_after = jormungandr
.explorer()
.last_block()
.unwrap()
.data
.unwrap()
.tip
.block
.treasury
.unwrap()
.rewards
.parse::<u64>()
.unwrap();
let rewards_after: u64 = unimplemented!("treasury query not supported by external explorer");

assert!(
rewards_after == (rewards_before + rewards_increase),
Expand Down Expand Up @@ -323,19 +299,7 @@ pub fn test_vote_flow_praos() {

wait_for_epoch(3, jormungandr.rest());

let rewards_after = jormungandr
.explorer()
.last_block()
.unwrap()
.data
.unwrap()
.tip
.block
.treasury
.unwrap()
.rewards
.parse::<u64>()
.unwrap();
let rewards_after: u64 = unimplemented!("treasury query not supported by external explorer");

// We want to make sure that our small rewards increase is reflexed in current rewards amount
assert!(
Expand Down Expand Up @@ -423,19 +387,7 @@ pub fn jcli_e2e_flow() {

alice.confirm_transaction();

let rewards_before = jormungandr
.explorer()
.last_block()
.unwrap()
.data
.unwrap()
.tip
.block
.treasury
.unwrap()
.rewards
.parse::<u64>()
.unwrap();
let rewards_before: u64 = unimplemented!("treasury query not supported by external explorer");

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

Expand Down Expand Up @@ -529,19 +481,7 @@ pub fn jcli_e2e_flow() {
3
);

let rewards_after = jormungandr
.explorer()
.last_block()
.unwrap()
.data
.unwrap()
.tip
.block
.treasury
.unwrap()
.rewards
.parse::<u64>()
.unwrap();
let rewards_after: u64 = unimplemented!("treasury query not supported by external explorer");

// We want to make sure that our small rewards increase is reflexed in current rewards amount
assert!(
Expand Down
Expand Up @@ -16,18 +16,6 @@ query AllBlocks($last: Int!) {
chainLength
totalInput
totalOutput
treasury {
rewards
treasury
treasuryTax {
fixed
ratio {
numerator
denominator
}
maxLimit
}
}
}
}
totalCount
Expand Down
Expand Up @@ -9,10 +9,6 @@ query LastBlock {
}
slot
}
treasury {
rewards
treasury
}
}
}
}
Expand Up @@ -26,7 +26,6 @@ type Block {
previousBlock: Block!
totalInput: Value!
totalOutput: Value!
treasury: Treasury
isConfirmed: Boolean!
branches: [Branch!]!
}
Expand Down Expand Up @@ -200,7 +199,7 @@ type Proposal {

"""
get the vote options range
this is the available range of choices to make for the given
proposal. all casted votes for this proposals ought to be in
within the given range
Expand Down Expand Up @@ -320,12 +319,6 @@ type TransactionOutput {
address: Address!
}

type Treasury {
rewards: Value!
treasury: Value!
treasuryTax: TaxType!
}

scalar Value

type VoteCast {
Expand Down
Expand Up @@ -3,7 +3,6 @@ pub type Slot = String;
pub type ChainLength = String;
pub type PoolId = String;
pub type Value = String;
pub type NonZero = String;
pub type VotePlanId = String;

use graphql_client::GraphQLQuery;
Expand Down

0 comments on commit 5de823e

Please sign in to comment.