Fix query expiry computation (#1346)

This commit is contained in:
Pawan Dhananjay 2020-07-09 07:13:48 +05:30 committed by GitHub
parent 559b7c8faa
commit 275148a152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ impl QueryType {
Self::FindPeers => false,
Self::Subnet { min_ttl, .. } => {
if let Some(ttl) = min_ttl {
ttl > &Instant::now()
ttl < &Instant::now()
} else {
true
}
@ -471,7 +471,7 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
.count();
if peers_on_subnet > TARGET_SUBNET_PEERS {
trace!(self.log, "Discovery ignored";
debug!(self.log, "Discovery ignored";
"reason" => "Already connected to desired peers",
"connected_peers_on_subnet" => peers_on_subnet,
"target_subnet_peers" => TARGET_SUBNET_PEERS,