Skip to content

Commit

Permalink
feat(faucet): increase initial balance
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuef committed May 13, 2024
1 parent 785bb85 commit 4927aa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions sn_client/src/faucet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ use sn_transfers::{
get_existing_genesis_wallet, load_genesis_wallet, HotWallet, MainPubkey, NanoTokens,
};

const INITIAL_FAUCET_BALANCE: NanoTokens = NanoTokens::from(10000000000);
const INITIAL_FAUCET_BALANCE: NanoTokens = NanoTokens::from(100000000000000000);

/// Use the client to load the faucet wallet from the genesis Wallet.
/// With all balance transferred from the genesis_wallet to the faucet_wallet.
pub async fn fund_faucet_from_genesis_wallet(
client: &Client,
faucet_wallet: &mut HotWallet,
) -> Result<()> {
println!("funding faucet from genesis...");
info!("funding faucet from genesis...");

let faucet_balance = faucet_wallet.balance();
Expand All @@ -35,8 +34,8 @@ pub async fn fund_faucet_from_genesis_wallet(
let foundation_key = MainPubkey::from_hex("a4bd3f928c585a63ab6070337316c1832bffd92be8efe9b235ec1c631f03b4bb91e29bbad34994ddf9f77d9858ddb0bb")?; // DevSkim: ignore DS117838

let (foundation_cashnote, faucet_cashnote) = {
println!("Sending {genesis_balance} from genesis to faucet wallet..");
debug!("Sending {genesis_balance} from genesis to faucet wallet..");
println!("Sending {INITIAL_FAUCET_BALANCE} from genesis to faucet wallet..");
debug!("Sending {INITIAL_FAUCET_BALANCE} from genesis to faucet wallet..");

let genesis_wallet = get_existing_genesis_wallet();
println!("Faucet wallet balance: {}", faucet_wallet.balance());
Expand Down
3 changes: 2 additions & 1 deletion sn_faucet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ async fn main() -> Result<()> {
fund_faucet_from_genesis_wallet(&client, &mut funded_faucet).await?;

if let Err(err) = faucet_cmds(opt.cmd.clone(), &client, funded_faucet).await {
error!("Failed to run faucet cmd {:?} with err {err:?}", opt.cmd)
error!("Failed to run faucet cmd {:?} with err {err:?}", opt.cmd);
eprintln!("Failed to run faucet cmd {:?} with err {err:?}", opt.cmd);
}

Ok(())
Expand Down

0 comments on commit 4927aa9

Please sign in to comment.