mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
chore: random clippy
This commit is contained in:
@@ -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)),
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user