diff --git a/Anchor.toml b/Anchor.toml index 970e14b9..c99a48ce 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -3,7 +3,7 @@ resolution = false skip-lint = false [programs.localnet] validator_history = "HistoryJTGbKQD2mRgLZ3XhqHnN811Qpez8X9kCcGHoa" -steward = "sssh4zkKhX8jXTNQz1xDHyGpygzgu2UhcRcUvZihBjP" +steward = "Stewardf95sJbmtcZsyagb2dg4Mo8eVQho8gpECvLx8" [workspace] members = [ diff --git a/Cargo.lock b/Cargo.lock index 09dcba52..1e4b97bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6445,9 +6445,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -6466,9 +6466,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", diff --git a/programs/steward/Cargo.toml b/programs/steward/Cargo.toml index 874bfcfe..6032572c 100644 --- a/programs/steward/Cargo.toml +++ b/programs/steward/Cargo.toml @@ -14,6 +14,8 @@ name = "jito_steward" no-entrypoint = [] no-idl = [] no-log-ix-name = [] +mainnet-beta = [] +testnet = [] cpi = ["no-entrypoint"] default = ["custom-heap"] custom-heap = [] diff --git a/programs/steward/idl/steward.json b/programs/steward/idl/steward.json index 754c2d03..4333de0b 100644 --- a/programs/steward/idl/steward.json +++ b/programs/steward/idl/steward.json @@ -1,5 +1,5 @@ { - "address": "sssh4zkKhX8jXTNQz1xDHyGpygzgu2UhcRcUvZihBjP", + "address": "Stewardf95sJbmtcZsyagb2dg4Mo8eVQho8gpECvLx8", "metadata": { "name": "steward", "version": "0.1.0", diff --git a/programs/steward/src/instructions/compute_score.rs b/programs/steward/src/instructions/compute_score.rs index a2ef5b3d..580029e9 100644 --- a/programs/steward/src/instructions/compute_score.rs +++ b/programs/steward/src/instructions/compute_score.rs @@ -61,12 +61,14 @@ pub fn handler(ctx: Context, validator_list_index: usize) -> Resul state_account.state.state_tag, StewardStateEnum::ComputeScores ) { - maybe_transition( + if let Some(event) = maybe_transition( &mut state_account.state, &clock, &config.parameters, &epoch_schedule, - )?; + )? { + emit!(event); + } } require!( diff --git a/programs/steward/src/instructions/idle.rs b/programs/steward/src/instructions/idle.rs index 0dc5265f..4afc6585 100644 --- a/programs/steward/src/instructions/idle.rs +++ b/programs/steward/src/instructions/idle.rs @@ -39,12 +39,14 @@ pub fn handler(ctx: Context) -> Result<()> { Some(StewardStateEnum::Idle), )?; - maybe_transition( + if let Some(event) = maybe_transition( &mut state_account.state, &clock, &config.parameters, &epoch_schedule, - )?; + )? { + emit!(event); + } Ok(()) } diff --git a/programs/steward/src/lib.rs b/programs/steward/src/lib.rs index 7c600806..67b9ae69 100644 --- a/programs/steward/src/lib.rs +++ b/programs/steward/src/lib.rs @@ -17,7 +17,7 @@ pub mod utils; pub use state::*; -declare_id!("sssh4zkKhX8jXTNQz1xDHyGpygzgu2UhcRcUvZihBjP"); +declare_id!("Stewardf95sJbmtcZsyagb2dg4Mo8eVQho8gpECvLx8"); /* This program manages the selection of validators and delegation of stake for a SPL Stake Pool. diff --git a/programs/validator-history/Cargo.toml b/programs/validator-history/Cargo.toml index 6ed95c8c..377f3cbb 100644 --- a/programs/validator-history/Cargo.toml +++ b/programs/validator-history/Cargo.toml @@ -17,6 +17,8 @@ name = "validator_history" no-entrypoint = [] no-idl = [] no-log-ix-name = [] +mainnet-beta = [] +testnet = [] cpi = ["no-entrypoint"] default = ["custom-heap"] custom-heap = []