new checkpoint, add to mempool only if broadcast port from b171d28586

This commit is contained in:
DenioD
2020-08-03 10:49:29 +02:00
parent 21e7e20d6c
commit 7c65e566c4
4 changed files with 121 additions and 73 deletions

View File

@@ -1277,20 +1277,18 @@ impl LightClient {
info!("Creating transaction");
let rawtx = {
let result = {
let _lock = self.sync_lock.lock().unwrap();
self.wallet.write().unwrap().send_to_address(
u32::from_str_radix(&self.config.consensus_branch_id, 16).unwrap(),
&self.sapling_spend, &self.sapling_output,
addrs
addrs,
|txbytes| broadcast_raw_tx(&self.get_server_uri(), self.config.no_cert_verification, txbytes)
)
};
match rawtx {
Ok(txbytes) => broadcast_raw_tx(&self.get_server_uri(), self.config.no_cert_verification, txbytes),
Err(e) => Err(format!("Error: No Tx to broadcast. Error was: {}", e))
}
result.map(|(txid, _)| txid)
}
}