Skip to content

Commit

Permalink
Credit addresses with initial coins in testnet init_chain
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Feb 14, 2024
1 parent 7830294 commit 2f36905
Show file tree
Hide file tree
Showing 2 changed files with 1,008 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,14 @@ mod abci {
#[cfg(feature = "testnet")]
{
self.upgrade.activation_delay_seconds = 20 * 60;

include_str!("../testnet_addresses.csv")
.lines()
.map(|line| {
let address = line.parse().unwrap();
self.accounts.deposit(address, Coin::mint(10_000_000_000))
})
.collect::<Result<()>>()?;

Check failure on line 442 in src/app.rs

View workflow job for this annotation

GitHub Actions / clippy

`.map().collect()` can be replaced with `.try_for_each()`

error: `.map().collect()` can be replaced with `.try_for_each()` --> src/app.rs:436:17 | 436 | / include_str!("../testnet_addresses.csv") 437 | | .lines() 438 | | .map(|line| { 439 | | let address = line.parse().unwrap(); 440 | | self.accounts.deposit(address, Coin::mint(10_000_000_000)) 441 | | }) 442 | | .collect::<Result<()>>()?; | |____________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_collect_result_unit = note: `-D clippy::map-collect-result-unit` implied by `-D warnings` help: try this | 436 ~ include_str!("../testnet_addresses.csv") 437 + .lines().try_for_each(|line| { 438 + let address = line.parse().unwrap(); 439 + self.accounts.deposit(address, Coin::mint(10_000_000_000)) 440 ~ })?; |
}

Ok(())
Expand Down
Loading

0 comments on commit 2f36905

Please sign in to comment.