فهرست منبع

chore: clippy

skoupidi 2 سال پیش
والد
کامیت
c8b726e0ca

+ 1 - 1
bin/darkfid/src/task/miner.rs

@@ -192,7 +192,7 @@ fn generate_transaction(
     let fork_previous_hash = last_proposal.block.header.previous;
 
     // We're just going to be using a zero spend-hook and user-data
-    let spend_hook = pallas::Base::zero();
+    let spend_hook = pallas::Base::zero().into();
     let user_data = pallas::Base::zero();
 
     // Build the transaction debris

+ 1 - 1
bin/drk/src/money.rs

@@ -699,7 +699,7 @@ impl Drk {
                     let leaf_position = tree.mark().unwrap();
 
                     let owncoin = OwnCoin {
-                        coin: coin.clone(),
+                        coin: *coin,
                         note: note.clone(),
                         secret: *secret,
                         nullifier: Nullifier::from(poseidon_hash([secret.inner(), coin.inner()])),

+ 2 - 2
src/contract/money/tests/verification_bench.rs

@@ -162,7 +162,7 @@ fn alice2alice_multiplecoins_random_amounts() -> Result<()> {
             info!(target: "money", "[Faucet] ===================================================");
             info!(target: "money", "[Faucet] Building Money::Mint params for Alice's mint for token {} and amount {}", i, amount);
             info!(target: "money", "[Faucet] ===================================================");
-            let (mint_tx, mint_params) =
+            let (mint_tx, mint_params, mint_auth_params) =
                 th.token_mint(amount, &Holder::Alice, &Holder::Alice, None, None)?;
 
             for holder in &HOLDERS {
@@ -177,7 +177,7 @@ fn alice2alice_multiplecoins_random_amounts() -> Result<()> {
 
             // Gather new owncoins
             let owncoin =
-                th.gather_owncoin_from_output(&Holder::Alice, &mint_params.output, None)?;
+                th.gather_owncoin(&Holder::Alice, &mint_params.coin, &mint_auth_params.enc_note, None)?;
             let token_id = owncoin.note.token_id;
             owncoins.push(vec![owncoin]);
             minted_amounts.push(amount);

+ 1 - 1
src/contract/test-harness/src/lib.rs

@@ -304,7 +304,7 @@ impl TestHarness {
 
         let note: MoneyNote = note.decrypt(&secret_key)?;
         let oc = OwnCoin {
-            coin: coin.clone(),
+            coin: *coin,
             note: note.clone(),
             secret: secret_key,
             nullifier: Nullifier::from(poseidon_hash([