Fixed bug which required a node to hold local trade presences before it would request any.

This caused large gaps with no presence data. They are removed when they expire, causing the local count to drop to zero, and the node would only start requesting them again once a peer had pushed one or more entries proactively.
This commit is contained in:
CalDescent 2022-09-24 15:48:45 +01:00 committed by Matthew DeGarmo
parent 41438e1b48
commit e2342e2327

View File

@ -468,9 +468,6 @@ public class TradeBot implements Listener {
List<TradePresenceData> safeTradePresences = List.copyOf(this.safeAllTradePresencesByPubkey.values()); List<TradePresenceData> safeTradePresences = List.copyOf(this.safeAllTradePresencesByPubkey.values());
if (safeTradePresences.isEmpty())
return;
LOGGER.debug("Broadcasting all {} known trade presences. Next broadcast timestamp: {}", LOGGER.debug("Broadcasting all {} known trade presences. Next broadcast timestamp: {}",
safeTradePresences.size(), nextTradePresenceBroadcastTimestamp safeTradePresences.size(), nextTradePresenceBroadcastTimestamp
); );