mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Quote protocol asb/cli instead of alice/bob
The quote protocol has no relation to the protocol roles but to the application hence the rename.
This commit is contained in:
parent
c0070f8fa7
commit
c2c9e975ef
@ -94,7 +94,7 @@ where
|
||||
env_config: env::Config,
|
||||
) -> Self {
|
||||
Self {
|
||||
quote: quote::alice(),
|
||||
quote: quote::asb(),
|
||||
swap_setup: alice::Behaviour::new(
|
||||
min_buy,
|
||||
max_buy,
|
||||
|
@ -78,7 +78,7 @@ impl Behaviour {
|
||||
bitcoin_wallet: Arc<bitcoin::Wallet>,
|
||||
) -> Self {
|
||||
Self {
|
||||
quote: quote::bob(),
|
||||
quote: quote::cli(),
|
||||
swap_setup: bob::Behaviour::new(env_config, bitcoin_wallet),
|
||||
transfer_proof: transfer_proof::bob(),
|
||||
encrypted_signature: encrypted_signature::bob(),
|
||||
|
@ -37,10 +37,11 @@ pub struct BidQuote {
|
||||
pub max_quantity: bitcoin::Amount,
|
||||
}
|
||||
|
||||
/// Constructs a new instance of the `quote` behaviour to be used by Alice.
|
||||
/// Constructs a new instance of the `quote` behaviour to be used by the ASB.
|
||||
///
|
||||
/// Alice only supports inbound connections, i.e. handing out quotes.
|
||||
pub fn alice() -> Behaviour {
|
||||
/// The ASB is always listening and only supports inbound connections, i.e.
|
||||
/// handing out quotes.
|
||||
pub fn asb() -> Behaviour {
|
||||
Behaviour::new(
|
||||
JsonPullCodec::default(),
|
||||
vec![(BidQuoteProtocol, ProtocolSupport::Inbound)],
|
||||
@ -48,10 +49,11 @@ pub fn alice() -> Behaviour {
|
||||
)
|
||||
}
|
||||
|
||||
/// Constructs a new instance of the `quote` behaviour to be used by Bob.
|
||||
/// Constructs a new instance of the `quote` behaviour to be used by the CLI.
|
||||
///
|
||||
/// Bob only supports outbound connections, i.e. requesting quotes.
|
||||
pub fn bob() -> Behaviour {
|
||||
/// The CLI is always dialing and only supports outbound connections, i.e.
|
||||
/// requesting quotes.
|
||||
pub fn cli() -> Behaviour {
|
||||
Behaviour::new(
|
||||
JsonPullCodec::default(),
|
||||
vec![(BidQuoteProtocol, ProtocolSupport::Outbound)],
|
||||
|
Loading…
Reference in New Issue
Block a user