Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
janlegner committed Nov 24, 2023
1 parent 0794538 commit 709c9be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion .buildkite/prepare-claims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ steps:
- 'epoch=$(buildkite-agent meta-data get epoch)'
- 'gcloud storage cp "$$snapshot_dir/validators.json" "$$gs_bucket/$$epoch/"'
- 'gcloud storage cp "$$snapshot_dir/stakes.json" "$$gs_bucket/$$epoch/"'
- 'gcloud storage cp "$$snapshot_dir/events.json" "$$gs_bucket/$$epoch/"'
- 'gcloud storage cp "$$snapshot_dir/claims.json" "$$gs_bucket/$$epoch/"'
- 'gcloud storage cp "$$snapshot_dir/claims_merkle.json" "$$gs_bucket/$$epoch/"'
- 'gcloud storage cp "$$snapshot_dir/events_all.json" "$$gs_bucket/$$epoch/"'
Expand Down
15 changes: 9 additions & 6 deletions insurance-engine/src/bin/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct Args {
#[arg(long, env)]
output_merkle_tree_collection: String,

#[arg(long, env)]
#[arg(long, env, value_delimiter = ',')]
whitelist_stake_authority: Option<Vec<String>>,

#[arg(long, env)]
Expand All @@ -39,9 +39,16 @@ fn main() -> anyhow::Result<()> {
let mut builder = Builder::from_env(Env::default().default_filter_or("info"));
builder.init();

info!("Starting insurance enging...");
info!("Starting insurance engine...");
let args: Args = Args::parse();

if let Some(whitelisted_stake_authorities) = &args.whitelist_stake_authority {
info!(
"Using whitelist on stake authorities: {:?}",
whitelisted_stake_authorities
);
}

info!("Loading validator meta collection...");
let validator_meta_collection: ValidatorMetaCollection =
read_from_json_file(&args.validator_meta_collection)?;
Expand All @@ -60,10 +67,6 @@ fn main() -> anyhow::Result<()> {
&args.output_insured_event_collection,
)?;

if let Some(whitelisted_stake_authorities) = &args.whitelist_stake_authority {
info!("Using whitelist on stake authorities: {:?}", whitelisted_stake_authorities);
}

let stake_meta_filter = match args.whitelist_stake_authority {
Some(whitelisted_stake_authorities) => Some(stake_authorities_filter(HashSet::from_iter(
whitelisted_stake_authorities,
Expand Down

0 comments on commit 709c9be

Please sign in to comment.