chore: random clippy

This commit is contained in:
aggstam
2023-05-11 00:26:31 +03:00
parent 83fcb5e98e
commit dd3820b971
4 changed files with 4 additions and 4 deletions

View File

@@ -153,7 +153,7 @@ impl SlotCheckpointStoreOverlay {
/// Fetch given slot from the slotcheckpointstore.
pub fn get(&self, slot: u64) -> Result<Vec<u8>> {
match self.0.lock().unwrap().get(&SLED_SLOT_CHECKPOINT_TREE, &slot.to_be_bytes())? {
match self.0.lock().unwrap().get(SLED_SLOT_CHECKPOINT_TREE, &slot.to_be_bytes())? {
Some(found) => Ok(found.to_vec()),
None => Err(Error::SlotNotFound(slot)),
}

View File

@@ -86,7 +86,7 @@ impl Clock {
/// return absolute tick to genesis, and relative tick index in the slot.
async fn tick_time(&self) -> (u64, u64, u64) {
let time = self.time_to_genesis().await.0 as u64;
let time = self.time_to_genesis().await.0;
let tick_abs: u64 = time / self.tick_len;
let tick_rel: u64 = time % self.tick_len;
(time, tick_rel, tick_abs)

View File

@@ -42,7 +42,7 @@ pub async fn proposal_task(
if current_ts < bootstrap_ts {
let diff = bootstrap_ts.0 - current_ts.0;
info!(target: "consensus::proposal", "consensus: Waiting for network bootstrap: {} seconds", diff);
sleep(diff as u64).await;
sleep(diff).await;
} else {
let mut sleep_time = state.read().await.consensus.time_keeper.next_n_slot_start(1);
let sync_offset = constants::FINAL_SYNC_DUR;

View File

@@ -269,7 +269,7 @@ impl ConsensusProposalCallBuilder {
let stake_params = ConsensusProposalMintParamsV1 {
input: input.clone(),
output: output.clone(),
serial_commit: serial_commit.clone(),
serial_commit,
};
let stake_proofs = vec![proof];
let stake_input = input;