Rename action_generator_alice to action_generator

This commit is contained in:
Lucas Soriano del Pino 2020-10-26 10:59:28 +11:00
parent e84c56378c
commit c86a82b315
2 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,7 @@ pub trait ReceiveBitcoinRedeemEncsig {
/// ///
/// This is called post handshake, after all the keys, addresses and most of the /// This is called post handshake, after all the keys, addresses and most of the
/// signatures have been exchanged. /// signatures have been exchanged.
pub fn action_generator_alice<N, B>( pub fn action_generator<N, B>(
mut network: N, mut network: N,
bitcoin_client: Arc<B>, bitcoin_client: Arc<B>,
// TODO: Replace this with a new, slimmer struct? // TODO: Replace this with a new, slimmer struct?

View file

@ -19,7 +19,7 @@ use rand::rngs::OsRng;
use testcontainers::clients::Cli; use testcontainers::clients::Cli;
use tracing::info; use tracing::info;
use xmr_btc::{ use xmr_btc::{
alice::{self, action_generator_alice, ReceiveBitcoinRedeemEncsig}, alice::{self, ReceiveBitcoinRedeemEncsig},
bitcoin::{BroadcastSignedTransaction, EncryptedSignature, SignTxLock}, bitcoin::{BroadcastSignedTransaction, EncryptedSignature, SignTxLock},
bob::{self, ReceiveTransferProof}, bob::{self, ReceiveTransferProof},
monero::{CreateWalletForOutput, Transfer, TransferProof}, monero::{CreateWalletForOutput, Transfer, TransferProof},
@ -87,7 +87,7 @@ async fn swap_as_alice(
behaviour: AliceBehaviour, behaviour: AliceBehaviour,
state: alice::State3, state: alice::State3,
) -> Result<()> { ) -> Result<()> {
let mut action_generator = action_generator_alice(network, bitcoin_wallet.clone(), state); let mut action_generator = alice::action_generator(network, bitcoin_wallet.clone(), state);
loop { loop {
let state = action_generator.async_resume().await; let state = action_generator.async_resume().await;