206: Remove misplaced wallet sync call r=rishflab a=rishflab

These bdk wallet sync calls must of gotten lost during a rebase. Removed the call in build TxLock and added one when nectar starts up

Co-authored-by: rishflab <rishflab@hotmail.com>
pull/213/head
bors[bot] 3 years ago committed by GitHub
commit 48635156ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -140,6 +140,12 @@ async fn init_wallets(
private_key, private_key,
) )
.await?; .await?;
bitcoin_wallet
.sync_wallet()
.await
.expect("Could not sync btc wallet");
let bitcoin_balance = bitcoin_wallet.balance().await?; let bitcoin_balance = bitcoin_wallet.balance().await?;
info!( info!(
"Connection to Bitcoin wallet succeeded, balance: {}", "Connection to Bitcoin wallet succeeded, balance: {}",

@ -119,7 +119,6 @@ impl BuildTxLockPsbt for Wallet {
output_amount: Amount, output_amount: Amount,
) -> Result<PartiallySignedTransaction> { ) -> Result<PartiallySignedTransaction> {
tracing::debug!("building tx lock"); tracing::debug!("building tx lock");
self.sync_wallet().await?;
let (psbt, _details) = self.inner.lock().await.create_tx( let (psbt, _details) = self.inner.lock().await.create_tx(
bdk::TxBuilder::with_recipients(vec![( bdk::TxBuilder::with_recipients(vec![(
output_address.script_pubkey(), output_address.script_pubkey(),

Loading…
Cancel
Save