From 3694c575d9499f3b61ee5e2098b58f97a76c84fb Mon Sep 17 00:00:00 2001 From: Dhruv D Jain Date: Wed, 16 Oct 2024 00:06:48 +0530 Subject: [PATCH] Update solana/solana-ibc/programs/solana-ibc/src/lib.rs Co-authored-by: Michal Nazarewicz --- solana/solana-ibc/programs/solana-ibc/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/solana/solana-ibc/programs/solana-ibc/src/lib.rs b/solana/solana-ibc/programs/solana-ibc/src/lib.rs index 5a69066b..658f6e97 100644 --- a/solana/solana-ibc/programs/solana-ibc/src/lib.rs +++ b/solana/solana-ibc/programs/solana-ibc/src/lib.rs @@ -413,8 +413,9 @@ pub mod solana_ibc { let root = store.borrow().provable.hash().clone(); if previous_root != root { msg!("Writing local consensus state"); - let slot = Clock::get()?.slot; - let timestamp = Clock::get()?.unix_timestamp as u64; + let clock = Clock::get()?; + let slot = clock.slot; + let timestamp = clock.unix_timestamp as u64; let storage = &mut store.borrow_mut().private; storage .add_local_consensus_state(slot, timestamp, root)