From f5e6ba18e03362e8ff8471dd38c32ca32777019a Mon Sep 17 00:00:00 2001 From: rishflab Date: Wed, 17 Mar 2021 15:26:44 +1100 Subject: [PATCH] Use different address for redeem and punish Having the same address could potentially cause issues when subscribing to transactions by script --- swap/src/protocol/alice/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swap/src/protocol/alice/state.rs b/swap/src/protocol/alice/state.rs index 263aee10..9eacc87b 100644 --- a/swap/src/protocol/alice/state.rs +++ b/swap/src/protocol/alice/state.rs @@ -106,7 +106,7 @@ impl State0 { let a = bitcoin::SecretKey::new_random(rng); let v_a = monero::PrivateViewKey::new_random(rng); let redeem_address = bitcoin_wallet.new_address().await?; - let punish_address = redeem_address.clone(); + let punish_address = bitcoin_wallet.new_address().await?; let s_a = monero::Scalar::random(rng); let (dleq_proof_s_a, (S_a_bitcoin, S_a_monero)) = CROSS_CURVE_PROOF_SYSTEM.prove(&s_a, rng);