Skip to content

Commit

Permalink
Add initial supply for block rewards computation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Lacy committed Nov 1, 2024
1 parent 2bb1bc7 commit 33cf704
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions contracts/btc-finality/src/multitest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mod finality {
use babylon_apis::finality_api::IndexedBlock;
use test_utils::get_public_randomness_commitment;

use cosmwasm_std::Event;
use cosmwasm_std::{coin, Event};
use test_utils::{
create_new_finality_provider, get_add_finality_sig, get_derived_btc_delegation,
get_pub_rand_value,
Expand Down Expand Up @@ -78,8 +78,12 @@ mod finality {
let proof = add_finality_signature.proof.unwrap();

let initial_height = pub_rand.start_height;
let initial_funds = &[coin(1_000_000, "TOKEN")];

let mut suite = SuiteBuilder::new().with_height(initial_height).build();
let mut suite = SuiteBuilder::new()
.with_height(initial_height)
.with_funds(initial_funds)
.build();

// Register one FP
// NOTE: the test data ensures that pub rand commit / finality sig are
Expand Down Expand Up @@ -166,8 +170,12 @@ mod finality {
let proof = add_finality_signature.proof.unwrap();

let initial_height = pub_rand.start_height;
let initial_funds = &[coin(1_000_000_000_000, "TOKEN")];

let mut suite = SuiteBuilder::new().with_height(initial_height).build();
let mut suite = SuiteBuilder::new()
.with_funds(initial_funds)
.with_height(initial_height)
.build();

// signed by the 1st FP
let new_fp = create_new_finality_provider(1);
Expand Down Expand Up @@ -260,6 +268,7 @@ mod finality {

mod slashing {
use babylon_apis::finality_api::IndexedBlock;
use cosmwasm_std::coin;
use test_utils::{
create_new_finality_provider, get_add_finality_sig, get_add_finality_sig_2,
get_derived_btc_delegation, get_pub_rand_value,
Expand All @@ -278,8 +287,12 @@ mod slashing {
let proof = add_finality_signature.proof.unwrap();

let initial_height = pub_rand.start_height;
let initial_funds = &[coin(10_000_000_000_000, "TOKEN")];

let mut suite = SuiteBuilder::new().with_height(initial_height).build();
let mut suite = SuiteBuilder::new()
.with_funds(initial_funds)
.with_height(initial_height)
.build();

// Register one FP
// NOTE: the test data ensures that pub rand commit / finality sig are
Expand Down

0 comments on commit 33cf704

Please sign in to comment.