Browse Source

Added another missing block archive lookup relating to trade timestamps.

Note that this is unlikely to be the cause of some of the zero timestamps issue seen on a subset of nodes - there is still likely to be another problem that needs fixing.
mempow-testing
CalDescent 3 years ago
parent
commit
3e0574e563
  1. 4
      src/main/java/org/qortal/api/resource/CrossChainResource.java

4
src/main/java/org/qortal/api/resource/CrossChainResource.java

@ -195,6 +195,10 @@ public class CrossChainResource {
if (minimumTimestamp != null) { if (minimumTimestamp != null) {
minimumFinalHeight = repository.getBlockRepository().getHeightFromTimestamp(minimumTimestamp); minimumFinalHeight = repository.getBlockRepository().getHeightFromTimestamp(minimumTimestamp);
if (minimumFinalHeight == 0) {
// Try the archive
minimumFinalHeight = repository.getBlockArchiveRepository().getHeightFromTimestamp(minimumTimestamp);
}
if (minimumFinalHeight == 0) if (minimumFinalHeight == 0)
// We don't have any blocks since minimumTimestamp, let alone trades, so nothing to return // We don't have any blocks since minimumTimestamp, let alone trades, so nothing to return

Loading…
Cancel
Save