From c8b726e0ca61cf08a424c4c319cd416d9c39bd5a Mon Sep 17 00:00:00 2001 From: skoupidi Date: Tue, 6 Feb 2024 15:34:13 +0200 Subject: [PATCH] chore: clippy --- bin/darkfid/src/task/miner.rs | 2 +- bin/drk/src/money.rs | 2 +- src/contract/money/tests/verification_bench.rs | 4 ++-- src/contract/test-harness/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/darkfid/src/task/miner.rs b/bin/darkfid/src/task/miner.rs index a426ed3dc..ef8933705 100644 --- a/bin/darkfid/src/task/miner.rs +++ b/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 diff --git a/bin/drk/src/money.rs b/bin/drk/src/money.rs index e0e1bcd97..701f76644 100644 --- a/bin/drk/src/money.rs +++ b/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()])), diff --git a/src/contract/money/tests/verification_bench.rs b/src/contract/money/tests/verification_bench.rs index 506f28870..804fb3d9b 100644 --- a/src/contract/money/tests/verification_bench.rs +++ b/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); diff --git a/src/contract/test-harness/src/lib.rs b/src/contract/test-harness/src/lib.rs index f75126e66..fee991983 100644 --- a/src/contract/test-harness/src/lib.rs +++ b/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([