mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-25 06:39:53 -04:00
Decouple ASB/CLI Errors from Error sent over wire
What goes over the wire should not be coupled to the errors being printed. For the CLI and ASB we introduce a separate error enum that is used for logging. When sending over the wire the errors are mapped to and from the `network::spot_price::Error`. As part of Bob-specific spot_price code was moved from the network into bob. Clearly separation of the network API from bob/alice.
This commit is contained in:
parent
52f648e1de
commit
5aac76598d
9 changed files with 190 additions and 61 deletions
|
@ -6,6 +6,7 @@ use crate::{monero, tor};
|
|||
use anyhow::Result;
|
||||
use libp2p::swarm::{NetworkBehaviour, SwarmBuilder};
|
||||
use libp2p::{PeerId, Swarm};
|
||||
use std::fmt::Debug;
|
||||
|
||||
pub fn alice<LR>(
|
||||
seed: &Seed,
|
||||
|
@ -16,7 +17,7 @@ pub fn alice<LR>(
|
|||
resume_only: bool,
|
||||
) -> Result<Swarm<alice::Behaviour<LR>>>
|
||||
where
|
||||
LR: LatestRate + Send + 'static,
|
||||
LR: LatestRate + Send + 'static + Debug,
|
||||
{
|
||||
with_clear_net(
|
||||
seed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue