Skip to content

Commit

Permalink
tests: duplicated_vote - add initial token
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Jan 17, 2022
1 parent 690f9de commit 11f7725
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions testing/jormungandr-integration-tests/src/jormungandr/vit/public.rs
Expand Up @@ -686,12 +686,29 @@ pub fn jcli_e2e_flow() {
pub fn duplicated_vote() {
let mut alice = thor::Wallet::default();

let vote_plan = VotePlanBuilder::new()
.proposals_count(3)
.action_type(VoteAction::OffChain)
.vote_start(BlockDate::from_epoch_slot_id(1, 0))
.tally_start(BlockDate::from_epoch_slot_id(2, 0))
.tally_end(BlockDate::from_epoch_slot_id(3, 0))
.public()
.build();

let minting_policy = MintingPolicy::new();
let token_id = vote_plan.voting_token();

let jormungandr = startup::start_bft(
vec![&alice],
ConfigurationBuilder::new()
.with_slots_per_epoch(20)
.with_slot_duration(3)
.with_linear_fees(LinearFee::new(0, 0, 0)),
.with_linear_fees(LinearFee::new(0, 0, 0))
.with_token(InitialToken {
token_id: token_id.clone().into(),
policy: minting_policy.into(),
to: vec![alice.to_initial_token(1_000_000_000)],
}),
)
.unwrap();

Expand All @@ -700,15 +717,6 @@ pub fn duplicated_vote() {
.account_state(&alice.account_id())
.unwrap();

let vote_plan = VotePlanBuilder::new()
.proposals_count(3)
.action_type(VoteAction::OffChain)
.vote_start(BlockDate::from_epoch_slot_id(1, 0))
.tally_start(BlockDate::from_epoch_slot_id(2, 0))
.tally_end(BlockDate::from_epoch_slot_id(3, 0))
.public()
.build();

thor::FragmentChainSender::from_with_setup(
jormungandr.block0_configuration(),
jormungandr.to_remote(),
Expand Down

0 comments on commit 11f7725

Please sign in to comment.