Skip to content

Commit b73ee1b

Browse files
committed
safer file checks in new_distributor
1 parent 9c7f30b commit b73ee1b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/mainnet-beta.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,6 @@ jobs:
6363
run: |
6464
kubectl rollout restart -n $BRANCH_NAME statefulset/airdrop-distributor
6565
kubectl rollout restart -n $BRANCH_NAME statefulset/airdrop-distributor-2
66-
kubectl rollout restart -n $BRANCH_NAME statefulset/airdrop-distributor-3
66+
kubectl rollout restart -n $BRANCH_NAME statefulset/airdrop-distributor-3
67+
kubectl rollout restart -n $BRANCH_NAME statefulset/airdrop-fuel-1
68+
kubectl rollout restart -n $BRANCH_NAME statefulset/airdrop-fuel-1-locked

cli/src/bin/instructions/process_new_distributor.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@ pub fn process_new_distributor(args: &Args, new_distributor_args: &NewDistributo
1818
for file in paths {
1919
let single_tree_path = file.path();
2020

21-
let merkle_tree =
22-
AirdropMerkleTree::new_from_file(&single_tree_path).expect("failed to read");
21+
let merkle_tree = match AirdropMerkleTree::new_from_file(&single_tree_path) {
22+
Ok(tree) => tree,
23+
Err(e) => {
24+
println!(
25+
"Skipping file {:?} - failed to read: {:?}",
26+
single_tree_path, e
27+
);
28+
continue;
29+
}
30+
};
2331

2432
if new_distributor_args.airdrop_version.is_some() {
2533
let airdrop_version = new_distributor_args.airdrop_version.unwrap();

0 commit comments

Comments
 (0)