Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions dash-spv/src/client/transactions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Transaction-related client APIs (e.g., broadcasting)

use crate::error::{NetworkError, Result, SpvError, SyncError};
use crate::error::{NetworkError, Result, SpvError};
use crate::network::NetworkManager;
use crate::storage::StorageManager;
use dashcore::network::message::NetworkMessage;
Expand All @@ -16,10 +16,6 @@ impl<W: WalletInterface, N: NetworkManager, S: StorageManager, H: EventHandler>
/// The transaction is also injected into the local message pipeline so that
/// the mempool manager processes it immediately.
pub async fn broadcast_transaction(&self, tx: &dashcore::Transaction) -> Result<()> {
if !self.sync_progress().await.is_synced() {
return Err(SpvError::Sync(SyncError::NotSynced));
}

let network_guard = self.network.lock().await;

if network_guard.peer_count() == 0 {
Expand Down
Loading