Skip to content

Commit

Permalink
remove logging, filter non upgrade proposal records before processing
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Jul 10, 2024
1 parent ccc01fd commit 9055b19
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ class ExplorerService(
val typeUrl = govService.getUpgradeProtoType()
val scheduledName = runBlocking { govClient.getIfUpgradeScheduled()?.plan?.name }
val proposals = GovProposalRecord.findByProposalType(typeUrl)
.filter { it.status == Gov.ProposalStatus.PROPOSAL_STATUS_PASSED.name }
.filter {
it.status == Gov.ProposalStatus.PROPOSAL_STATUS_PASSED.name && it.getUpgradePlan() != null
}
val knownReleases =
CacheUpdateRecord.fetchCacheByKey(CacheKeys.CHAIN_RELEASES.key)?.cacheValue?.let {
VANILLA_MAPPER.readValue<List<GithubReleaseData>>(it)
Expand All @@ -230,8 +232,6 @@ class ExplorerService(
}
val upgrades = proposals.windowed(2, 1, true) { chunk ->
(chunk.first() to chunk.getOrNull(1)).let { (one, two) ->
logger().info("First proposal $one")
logger().info("Second proposal $two")
val nextUpgrade = two?.getUpgradePlan()?.info
val (version, url) = one.getUpgradePlan()!!.info
.getLatestPatchVersion(knownReleases, props.upgradeVersionRegex, nextUpgrade)
Expand Down

0 comments on commit 9055b19

Please sign in to comment.