diff --git a/swap/src/main.rs b/swap/src/main.rs index 0c70d67e..c4e657b9 100644 --- a/swap/src/main.rs +++ b/swap/src/main.rs @@ -215,7 +215,7 @@ async fn main() -> Result<()> { alice_addr, alice_peer_id, ); - let (swap, event_loop) = bob_factory.recover_bob_from_db().await?; + let (swap, event_loop) = bob_factory.resume().await?; tokio::spawn(async move { event_loop.run().await }); bob::run(swap).await?; diff --git a/swap/src/protocol/bob.rs b/swap/src/protocol/bob.rs index f9ac84a2..560d69e9 100644 --- a/swap/src/protocol/bob.rs +++ b/swap/src/protocol/bob.rs @@ -129,7 +129,7 @@ impl SwapFactory { )) } - pub async fn recover_bob_from_db(&self) -> Result<(bob::Swap, bob::EventLoop)> { + pub async fn resume(&self) -> Result<(bob::Swap, bob::EventLoop)> { // reopen the existing database let db = Database::open(self.db_path.clone().as_path())?; diff --git a/swap/tests/testutils/mod.rs b/swap/tests/testutils/mod.rs index 021b8bd9..2872db9f 100644 --- a/swap/tests/testutils/mod.rs +++ b/swap/tests/testutils/mod.rs @@ -64,7 +64,7 @@ impl TestContext { } pub async fn recover_bob_from_db(&self) -> bob::Swap { - let (swap, event_loop) = self.bob_swap_factory.recover_bob_from_db().await.unwrap(); + let (swap, event_loop) = self.bob_swap_factory.resume().await.unwrap(); tokio::spawn(async move { event_loop.run().await });