diff --git a/nero-core/src/claim/mod.rs b/nero-core/src/claim/mod.rs index f454cee..ba852de 100644 --- a/nero-core/src/claim/mod.rs +++ b/nero-core/src/claim/mod.rs @@ -45,9 +45,7 @@ impl Claim { Self { amount: ctx.staked_amount + fee_rate - .checked_mul_by_weight( - ctx.assert_tx_weight + ctx.largest_disprove_weight, - ) + .checked_mul_by_weight(ctx.assert_tx_weight + ctx.largest_disprove_weight) .unwrap(), operator_pubkey: ctx.operator_pubkey.into(), comittee_aggpubkey: ctx.comittee_aggpubkey(), @@ -214,7 +212,7 @@ impl FundedClaim { taptree .control_block(&( - self.optimistic_payout_script().to_script(), + self.optimistic_payout_script().to_script(), LeafVersion::TapScript, )) .expect("taptree was constructed including assert script!") diff --git a/nero-core/src/context.rs b/nero-core/src/context.rs index 4b2c833..abdcb79 100644 --- a/nero-core/src/context.rs +++ b/nero-core/src/context.rs @@ -13,10 +13,13 @@ use bitcoin_splitter::split::script::SplitableScript; use musig2::{secp::Point, KeyAggContext}; use crate::{ - assert::Assert, disprove::{ + assert::Assert, + disprove::{ form_disprove_scripts_distorted_with_seed, form_disprove_scripts_with_seed, signing::SignedIntermediateState, Disprove, DisproveScript, - }, payout::PAYOUT_APPROX_WEIGHT, treepp::* + }, + payout::PAYOUT_APPROX_WEIGHT, + treepp::*, }; /// Global context of BitVM2 flow. @@ -133,7 +136,11 @@ impl Context { secp: ctx, operator_pubkey, operator_script_pubkey, - largest_disprove_weight: disprove_txs.iter().map(|tx| tx.compute_weigth()).max().unwrap(), + largest_disprove_weight: disprove_txs + .iter() + .map(|tx| tx.compute_weigth()) + .max() + .unwrap(), disprove_scripts, claim_challenge_period, assert_challenge_period, @@ -211,7 +218,11 @@ impl Context { secp: ctx, operator_pubkey, operator_script_pubkey, - largest_disprove_weight: disprove_txs.iter().map(|tx| tx.compute_weigth()).max().unwrap(), + largest_disprove_weight: disprove_txs + .iter() + .map(|tx| tx.compute_weigth()) + .max() + .unwrap(), disprove_scripts, claim_challenge_period, assert_challenge_period, diff --git a/nero-core/src/disprove/signing.rs b/nero-core/src/disprove/signing.rs index c4c55b4..a7e77e2 100644 --- a/nero-core/src/disprove/signing.rs +++ b/nero-core/src/disprove/signing.rs @@ -148,7 +148,6 @@ impl SignedIntermediateState { } } - /// Script for verification of the witness script. Additionally, /// the verification leaves the original stack and altstack of /// the intermediate state.