Skip to content

Commit

Permalink
fixes kaspanet#508: Fix has_sufficient_peer_connectivity for peerle…
Browse files Browse the repository at this point in the history
…ss networks
  • Loading branch information
D-Stacks committed Aug 29, 2024
1 parent c839a9d commit fbbccdd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rpc/service/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,12 @@ impl RpcCoreService {
}

fn has_sufficient_peer_connectivity(&self) -> bool {
// Other network types can be used in an isolated environment without peers
!matches!(self.flow_context.config.net.network_type, Mainnet | Testnet) || self.flow_context.hub().has_peers()
if matches!(self.flow_context.config.net.network_type, Mainnet | Testnet) {
self.flow_context.hub().has_peers()
} else {
// Other network types can be used in an isolated environment without peers
true
}
}

fn extract_tx_query(&self, filter_transaction_pool: bool, include_orphan_pool: bool) -> RpcResult<TransactionQuery> {
Expand Down

0 comments on commit fbbccdd

Please sign in to comment.