فهرست منبع

chore: random clippy

aggstam 3 سال پیش
والد
کامیت
dd3820b971

+ 1 - 1
src/blockchain/slot_checkpoint_store.rs

@@ -153,7 +153,7 @@ impl SlotCheckpointStoreOverlay {
 
 
     /// Fetch given slot from the slotcheckpointstore.
     /// Fetch given slot from the slotcheckpointstore.
     pub fn get(&self, slot: u64) -> Result<Vec<u8>> {
     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()),
             Some(found) => Ok(found.to_vec()),
             None => Err(Error::SlotNotFound(slot)),
             None => Err(Error::SlotNotFound(slot)),
         }
         }

+ 1 - 1
src/consensus/clock.rs

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

+ 1 - 1
src/consensus/task/proposal.rs

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

+ 1 - 1
src/contract/consensus/src/client/proposal_v1.rs

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