diff --git a/core/src/banking_stage.rs b/core/src/banking_stage.rs index d581c2a123..106cb1af7d 100644 --- a/core/src/banking_stage.rs +++ b/core/src/banking_stage.rs @@ -460,7 +460,7 @@ pub fn create_test_recorder( bank.slot(), Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.set_bank(&bank); @@ -701,7 +701,7 @@ mod tests { bank.slot(), None, bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let poh_recorder = Arc::new(Mutex::new(poh_recorder)); @@ -760,7 +760,7 @@ mod tests { bank.slot(), Some(4), bank.ticks_per_slot(), - pubkey, + &pubkey, ); let poh_recorder = Arc::new(Mutex::new(poh_recorder)); diff --git a/core/src/fullnode.rs b/core/src/fullnode.rs index 25225de221..785777b648 100644 --- a/core/src/fullnode.rs +++ b/core/src/fullnode.rs @@ -109,7 +109,7 @@ impl Fullnode { bank.slot(), leader_schedule_utils::next_leader_slot(&id, bank.slot(), &bank), bank.ticks_per_slot(), - id, + &id, ); let poh_recorder = Arc::new(Mutex::new(poh_recorder)); let poh_service = PohService::new(poh_recorder.clone(), &config.tick_config, &exit); diff --git a/core/src/poh_recorder.rs b/core/src/poh_recorder.rs index 66eac93138..5e3c5630e0 100644 --- a/core/src/poh_recorder.rs +++ b/core/src/poh_recorder.rs @@ -249,7 +249,7 @@ impl PohRecorder { start_slot: u64, my_leader_slot_index: Option, ticks_per_slot: u64, - id: Pubkey, + id: &Pubkey, ) -> (Self, Receiver) { let poh = Poh::new(last_entry_hash, tick_height); let (sender, receiver) = channel(); @@ -271,7 +271,7 @@ impl PohRecorder { }) .unwrap_or(None), max_last_leader_grace_ticks: ticks_per_slot / MAX_LAST_LEADER_GRACE_TICKS_FACTOR, - id, + id: *id, }, receiver, ) @@ -330,7 +330,7 @@ mod tests { 0, Some(4), DEFAULT_TICKS_PER_SLOT, - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.tick(); assert_eq!(poh_recorder.tick_cache.len(), 1); @@ -347,7 +347,7 @@ mod tests { 0, Some(4), DEFAULT_TICKS_PER_SLOT, - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.tick(); poh_recorder.tick(); @@ -364,7 +364,7 @@ mod tests { 0, Some(4), DEFAULT_TICKS_PER_SLOT, - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.tick(); assert_eq!(poh_recorder.tick_cache.len(), 1); @@ -383,7 +383,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let working_bank = WorkingBank { @@ -408,7 +408,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let working_bank = WorkingBank { @@ -445,7 +445,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.tick(); @@ -480,7 +480,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let working_bank = WorkingBank { @@ -507,7 +507,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let working_bank = WorkingBank { @@ -543,7 +543,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let working_bank = WorkingBank { @@ -576,7 +576,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let working_bank = WorkingBank { @@ -602,7 +602,7 @@ mod tests { 0, Some(4), DEFAULT_TICKS_PER_SLOT, - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.tick(); poh_recorder.tick(); @@ -625,7 +625,7 @@ mod tests { 0, Some(4), DEFAULT_TICKS_PER_SLOT, - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.tick(); poh_recorder.tick(); @@ -648,7 +648,7 @@ mod tests { 0, Some(4), DEFAULT_TICKS_PER_SLOT, - Pubkey::default(), + &Pubkey::default(), ); poh_recorder.tick(); poh_recorder.tick(); @@ -671,7 +671,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let ticks_per_slot = bank.ticks_per_slot(); let working_bank = WorkingBank { @@ -694,7 +694,7 @@ mod tests { 0, None, bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let (sender, receiver) = sync_channel(1); poh_recorder.set_bank(&bank); @@ -717,7 +717,7 @@ mod tests { 0, Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let end_slot = 3; @@ -752,7 +752,7 @@ mod tests { 0, None, bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); // Test that with no leader slot, we don't reach the leader tick diff --git a/core/src/poh_service.rs b/core/src/poh_service.rs index bd01772e40..4c4f229a1c 100644 --- a/core/src/poh_service.rs +++ b/core/src/poh_service.rs @@ -117,7 +117,7 @@ mod tests { bank.slot(), Some(4), bank.ticks_per_slot(), - Pubkey::default(), + &Pubkey::default(), ); let poh_recorder = Arc::new(Mutex::new(poh_recorder)); let exit = Arc::new(AtomicBool::new(false));