Rename bob::Message2 to Message5

As per the proposed changed in the sequence diagram.
The aim is to have a unique terminology per message instead of having
the same name for 2 consequent messages that share the same behaviour.

Note that the aim is to remove the shared `RequestResponse` behaviours.
This commit is contained in:
Franck Royer 2021-01-22 10:12:36 +11:00
parent 91fe18a796
commit 9a5e35c1bd
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
10 changed files with 58 additions and 57 deletions

View file

@ -9,7 +9,7 @@ use crate::{
config::Config,
monero,
monero::{monero_private_key, TransferProof},
protocol::{alice, bob, SwapAmounts},
protocol::{alice, bob, bob::Message5, SwapAmounts},
};
use anyhow::{anyhow, Result};
use ecdsa_fun::{
@ -438,11 +438,11 @@ pub struct State4 {
}
impl State4 {
pub fn next_message(&self) -> bob::Message3 {
pub fn next_message(&self) -> Message5 {
let tx_redeem = bitcoin::TxRedeem::new(&self.tx_lock, &self.redeem_address);
let tx_redeem_encsig = self.b.encsign(self.S_a_bitcoin, tx_redeem.digest());
bob::Message3 { tx_redeem_encsig }
Message5 { tx_redeem_encsig }
}
pub fn tx_redeem_encsig(&self) -> EncryptedSignature {