correct save stakes and add logs
This commit is contained in:
parent
c024ca6f26
commit
d96db29d30
|
@ -266,15 +266,15 @@ pub fn build_current_stakes(
|
|||
stake_map
|
||||
.iter()
|
||||
.filter(|(pubkey, stake)| is_stake_to_add(**pubkey, &stake.stake, current_epoch_info))
|
||||
.for_each(|(pubkey, stake)| {
|
||||
.for_each(|(_, stake)| {
|
||||
// log::trace!(
|
||||
// "LCOAL Stake {pubkey} account:{:?} stake:{stake:?}",
|
||||
// stake.stake.voter_pubkey
|
||||
// );
|
||||
(stakes_aggregated
|
||||
.entry(pubkey.to_string())
|
||||
.entry(stake.stake.voter_pubkey.to_string())
|
||||
.or_insert((0, 0)))
|
||||
.1 = stake.stake.stake;
|
||||
.1 += stake.stake.stake;
|
||||
});
|
||||
|
||||
//verify the list
|
||||
|
|
|
@ -214,7 +214,7 @@ async fn run_loop<F: Interceptor>(mut client: GeyserGrpcClient<F>) -> anyhow::Re
|
|||
//log interval
|
||||
_ = log_interval.tick() => {
|
||||
log::info!("Run_loop update new epoch:{current_epoch:?} current slot:{current_slot:?} next epoch start slot:{next_epoch_start_slot}");
|
||||
log::info!("Change epoch equality {} >= {}", current_slot.confirmed_slot, next_epoch_start_slot);
|
||||
log::info!("Change epoch equality {} >= {}", current_slot.confirmed_slot, next_epoch_start_slot-1);
|
||||
log::info!("number of stake accounts:{}", stakestore.nb_stake_account());
|
||||
}
|
||||
//Execute RPC call in another task
|
||||
|
|
|
@ -46,7 +46,7 @@ fn stake_map_insert_stake(
|
|||
std::collections::hash_map::Entry::Occupied(occupied) => {
|
||||
let strstake = occupied.into_mut(); // <-- get mut reference to existing value
|
||||
if strstake.last_update_slot < stake.last_update_slot {
|
||||
log::trace!("Stake updated for: {stake_account} stake:{stake:?}");
|
||||
log::info!("Stake updated for: {stake_account} stake:{stake:?}");
|
||||
*strstake = stake;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue