diff --git a/side-node/src/bitcoin/clients/esplora.rs b/side-node/src/bitcoin/clients/esplora.rs index 07fe848..038d0a7 100644 --- a/side-node/src/bitcoin/clients/esplora.rs +++ b/side-node/src/bitcoin/clients/esplora.rs @@ -34,7 +34,7 @@ impl EsploraWallet { /// Does NOT send it, you must call `broadcast` to do that. /// /// We could split the creation and signing easily if needed. - pub(crate) fn build_send_tx( + pub(crate) fn build_and_sign_send_tx( &mut self, recipient: Address, amount: Amount, diff --git a/side-node/src/bitcoin/driver.rs b/side-node/src/bitcoin/driver.rs index 115ebc4..e5e69fc 100644 --- a/side-node/src/bitcoin/driver.rs +++ b/side-node/src/bitcoin/driver.rs @@ -10,7 +10,9 @@ use crate::bitcoin::clients; /// /// Also, it very handily works with the mutinynet.com esplora server, which is configured /// with 30 second block times. -pub(crate) async fn run() -> Result<(), anyhow::Error> { +pub(crate) async fn run() -> Result<(), anyhow::Error> {} + +async fn simple_transfer() -> Result<(), anyhow::Error> { let mut dave = clients::esplora::create_wallet("dave", Network::Signet)?; let mut sammy = clients::esplora::create_wallet("sammy", Network::Signet)?; @@ -51,7 +53,7 @@ pub(crate) async fn run() -> Result<(), anyhow::Error> { std::process::exit(0); } - let tx = dave.build_send_tx(sammy_address, send_amount)?; + let tx = dave.build_and_sign_send_tx(sammy_address, send_amount)?; dave.broadcast(&tx).await?; Ok(())