Skip to content

Commit 09b9371

Browse files
OttoAllmendingerllm-git
andcommitted
fix(utxo-lib): use correct sign method for BIP-0327 test functions
Properly call sign_and_verify_with_aggpk_bitgo_legacy() instead of sign_and_verify_with_aggpk_bitgo() for legacy tests, and remove unused legacy_agg parameter. Issue: BTC-2652 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent 40dae3b commit 09b9371

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

modules/utxo-lib/bip-0327/reference.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -929,19 +929,18 @@ def sign_and_verify_with_aggpk_bitgo(
929929
sk_1: bytes,
930930
sk_2: bytes,
931931
pk_1: PlainPk,
932-
pk_2: PlainPk,
933-
legacy_agg: bool = False
932+
pk_2: PlainPk,
934933
) -> None:
935934
sign_and_verify_with_aggpk(
936935
aggpk,
937936
sk_1,
938-
sk_2,
939-
pk_1,
940-
pk_2,
941-
0,
942-
random_nonce=False,
943-
tweaks=[],
944-
is_xonly=[])
937+
sk_2,
938+
pk_1,
939+
pk_2,
940+
0,
941+
random_nonce=False,
942+
tweaks=[],
943+
is_xonly=[])
945944

946945
def sign_and_verify_with_aggpk_bitgo_legacy(
947946
aggpk: XonlyPk,
@@ -1017,13 +1016,12 @@ def test_agg_bitgo_p2tr_legacy() -> None:
10171016
aggregated_xonly = get_xonly_pk(keyagg_ctx)
10181017
assert aggregated_xonly == expected_internal_pubkey_p2tr, \
10191018
f"p2tr aggregation mismatch: expected {expected_internal_pubkey_p2tr.hex()}, got {aggregated_xonly.hex()}"
1020-
sign_and_verify_with_aggpk_bitgo(
1019+
sign_and_verify_with_aggpk_bitgo_legacy(
10211020
expected_internal_pubkey_p2tr,
10221021
privkey_bitgo,
10231022
privkey_user,
10241023
pubkey_bitgo,
1025-
pubkey_user,
1026-
legacy_agg=True,
1024+
pubkey_user,
10271025
)
10281026

10291027
# Aggregation with keys in reverse order yields same result

0 commit comments

Comments
 (0)