avoid using Into<Scalar> in internal methods

This commit is contained in:
conduition
2024-02-18 21:45:46 +00:00
parent 741a64085d
commit 692644a74b
2 changed files with 2 additions and 4 deletions

View File

@@ -100,7 +100,7 @@ pub(crate) fn build_outcome_txs(
pub(crate) fn partial_sign_outcome_txs<'a>(
params: &ContractParameters,
outcome_build_out: &OutcomeTransactionBuildOutput,
seckey: impl Into<Scalar>,
seckey: Scalar,
secnonces: impl IntoIterator<Item = SecNonce>,
aggnonces: impl IntoIterator<Item = &'a AggNonce>,
) -> Result<Vec<PartialSignature>, Error> {
@@ -108,7 +108,6 @@ pub(crate) fn partial_sign_outcome_txs<'a>(
let funding_spend_info = &outcome_build_out.funding_spend_info;
// Confirm the key is a part of the group.
let seckey = seckey.into();
funding_spend_info
.key_agg_ctx()
.pubkey_index(seckey.base_point_mul())

View File

@@ -123,11 +123,10 @@ pub(crate) fn partial_sign_split_txs<'a>(
params: &ContractParameters,
outcome_build_out: &OutcomeTransactionBuildOutput,
split_build_out: &SplitTransactionBuildOutput,
seckey: impl Into<Scalar>,
seckey: Scalar,
secnonces: impl IntoIterator<Item = SecNonce>,
aggnonces: impl IntoIterator<Item = &'a AggNonce>,
) -> Result<BTreeMap<WinCondition, PartialSignature>, Error> {
let seckey = seckey.into();
let pubkey = seckey.base_point_mul();
let mut partial_signatures = BTreeMap::<WinCondition, PartialSignature>::new();