Skip to content

Commit 79d6168

Browse files
committed
fix: set default value
1 parent fb4d958 commit 79d6168

File tree

5 files changed

+26
-34
lines changed

5 files changed

+26
-34
lines changed

Cargo.lock

Lines changed: 12 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,24 @@ futures = "0.3.21"
4545
getrandom = { version = "0.1.16", features = ["custom"] }
4646
hex = "0.4.3"
4747
home = "=0.5.9" # Custom for compatibility with rust 1.75
48-
jito-account-traits-derive = { package = "jito-account-traits-derive", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
49-
jito-bytemuck = { package = "jito-bytemuck", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
50-
jito-jsm-core = { package = "jito-jsm-core", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
48+
jito-account-traits-derive = { package = "jito-account-traits-derive", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
49+
jito-bytemuck = { package = "jito-bytemuck", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
50+
jito-jsm-core = { package = "jito-jsm-core", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
5151
jito-priority-fee-distribution-sdk = { path = "./priority_fee_distribution_sdk", version = "=0.0.1" }
52-
jito-restaking-client = { package = "jito-restaking-client", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
53-
jito-restaking-core = { package = "jito-restaking-core", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
54-
jito-restaking-program = { package = "jito-restaking-program", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41", features = ["no-entrypoint"] }
55-
jito-restaking-sdk = { package = "jito-restaking-sdk", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
52+
jito-restaking-client = { package = "jito-restaking-client", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
53+
jito-restaking-core = { package = "jito-restaking-core", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
54+
jito-restaking-program = { package = "jito-restaking-program", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade", features = ["no-entrypoint"] }
55+
jito-restaking-sdk = { package = "jito-restaking-sdk", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
5656
jito-tip-distribution-sdk = { path = "./tip_distribution_sdk", version = "=0.0.1" }
5757
jito-tip-payment-sdk = { path = "./tip_payment_sdk", version = "=0.0.1" }
5858
jito-tip-router-client = { path = "./clients/rust/jito_tip_router", version = "0.0.1" }
5959
jito-tip-router-core = { path = "./core", version = "=0.0.1" }
6060
jito-tip-router-program = { path = "./program", version = "=0.0.1" }
6161
jito-tip-router-shank-cli = { path = "./shank_cli", version = "=0.0.1" }
62-
jito-vault-client = { package = "jito-vault-client", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
63-
jito-vault-core = { package = "jito-vault-core", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
64-
jito-vault-program = { package = "jito-vault-program", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41", features = ["no-entrypoint"] }
65-
jito-vault-sdk = { package = "jito-vault-sdk", git = "https://github.com/jito-foundation/restaking", rev = "175b594f24c8913448942685c7345f7521dd0a41" }
62+
jito-vault-client = { package = "jito-vault-client", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
63+
jito-vault-core = { package = "jito-vault-core", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
64+
jito-vault-program = { package = "jito-vault-program", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade", features = ["no-entrypoint"] }
65+
jito-vault-sdk = { package = "jito-vault-sdk", git = "https://github.com/jito-foundation/restaking", branch = "v2.2-upgrade" }
6666
log = "0.4.22"
6767
matches = "0.1.10"
6868
meta-merkle-tree = { path = "./meta_merkle_tree", version = "=0.0.1" }

cli/src/handler.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ impl CliHandler {
8282
let config_file = solana_cli_config::CONFIG_FILE
8383
.as_ref()
8484
.ok_or_else(|| anyhow!("unable to get config file path"))?;
85-
match Config::load(config_file) {
86-
Ok(config) => read_keypair_file(config.keypair_path.as_str())
87-
.map_err(|e| anyhow!("Failed to read keypair path: {e:?}"))?,
88-
Err(_) => read_keypair_file(args.keypair_path.clone().unwrap())
89-
.map_err(|e| anyhow!("Failed to read keypair path: {e:?}"))?,
85+
Config::load(config_file)?
9086
}
9187
};
9288

tip-router-operator-cli/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ pub enum Commands {
148148
#[arg(long, env)]
149149
tip_router_program_id: Pubkey,
150150

151-
#[arg(long, env)]
152-
restaking_program_id: Option<Pubkey>,
151+
#[arg(long, env, default_value = "jito_restaking_program::id()")]
152+
restaking_program_id: Pubkey,
153153

154154
#[arg(long, env, default_value = "3")]
155155
num_monitored_epochs: u64,

tip-router-operator-cli/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ async fn main() -> Result<()> {
153153
let operator_address = cli.operator_address.clone();
154154
let cluster = cli.cluster.clone();
155155

156-
let restaking_program_id = restaking_program_id
157-
.map_or_else(jito_restaking_program::id, |program_id| program_id);
158-
159156
let slot = rpc_client.get_slot().await?;
160157
let restaking_config_addr =
161158
RestakingConfig::find_program_address(&restaking_program_id).0;

0 commit comments

Comments
 (0)