Skip to content

Commit 029401d

Browse files
[ci] Zero holding fee and initial amount values in responses so that they always agree.
Signed-off-by: Raymond Roestenburg <[email protected]>
1 parent 0a2c4f3 commit 029401d

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

apps/scan/src/main/scala/org/lfdecentralizedtrust/splice/scan/admin/api/client/SingleScanConnection.scala

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -399,30 +399,21 @@ class SingleScanConnection private[client] (
399399
closedRoundEffectiveAt <- CantonTimestamp.fromInstant(rt.closedRoundEffectiveAt.toInstant)
400400
appRewards <- Codec.decode(Codec.BigDecimal)(rt.appRewards)
401401
validatorRewards <- Codec.decode(Codec.BigDecimal)(rt.validatorRewards)
402-
changeToInitialAmountAsOfRoundZero <- Codec
403-
.decode(Codec.BigDecimal)(rt.changeToInitialAmountAsOfRoundZero)
404-
changeToHoldingFeesRate <- Codec.decode(Codec.BigDecimal)(rt.changeToHoldingFeesRate)
405402
cumulativeAppRewards <- Codec.decode(Codec.BigDecimal)(rt.cumulativeAppRewards)
406403
cumulativeValidatorRewards <- Codec
407404
.decode(Codec.BigDecimal)(rt.cumulativeValidatorRewards)
408-
cumulativeChangeToInitialAmountAsOfRoundZero <- Codec
409-
.decode(Codec.BigDecimal)(rt.cumulativeChangeToInitialAmountAsOfRoundZero)
410-
cumulativeChangeToHoldingFeesRate <- Codec
411-
.decode(Codec.BigDecimal)(rt.cumulativeChangeToHoldingFeesRate)
412-
totalAmuletBalance <- Codec.decode(Codec.BigDecimal)(rt.totalAmuletBalance)
413405
} yield {
406+
// changeToInitialAmountAsOfRoundZero, changeToHoldingFeesRate, cumulativeChangeToInitialAmountAsOfRoundZero,
407+
// cumulativeChangeToHoldingFeesRate and totalAmuletBalance are intentionally left out
408+
// since these do not match up anymore because amulet expires are attributed to the closed round at a later stage
409+
// in scan_txlog_store, at a time that can easily differ between SVs.
414410
ScanAggregator.RoundTotals(
415411
closedRound = rt.closedRound,
416412
closedRoundEffectiveAt = closedRoundEffectiveAt,
417413
appRewards = appRewards,
418414
validatorRewards = validatorRewards,
419-
changeToInitialAmountAsOfRoundZero = changeToInitialAmountAsOfRoundZero,
420-
changeToHoldingFeesRate = changeToHoldingFeesRate,
421415
cumulativeAppRewards = cumulativeAppRewards,
422416
cumulativeValidatorRewards = cumulativeValidatorRewards,
423-
cumulativeChangeToInitialAmountAsOfRoundZero = cumulativeChangeToInitialAmountAsOfRoundZero,
424-
cumulativeChangeToHoldingFeesRate = cumulativeChangeToHoldingFeesRate,
425-
totalAmuletBalance = totalAmuletBalance,
426417
)
427418
})
428419
}
@@ -436,13 +427,12 @@ class SingleScanConnection private[client] (
436427
trafficPurchasedCcSpent <- Codec.decode(Codec.BigDecimal)(rt.trafficPurchasedCcSpent)
437428
cumulativeAppRewards <- Codec.decode(Codec.BigDecimal)(rt.cumulativeAppRewards)
438429
cumulativeValidatorRewards <- Codec.decode(Codec.BigDecimal)(rt.cumulativeValidatorRewards)
439-
cumulativeChangeToInitialAmountAsOfRoundZero <- Codec
440-
.decode(Codec.BigDecimal)(rt.cumulativeChangeToInitialAmountAsOfRoundZero)
441-
cumulativeChangeToHoldingFeesRate <- Codec
442-
.decode(Codec.BigDecimal)(rt.cumulativeChangeToHoldingFeesRate)
443430
cumulativeTrafficPurchasedCcSpent <- Codec
444431
.decode(Codec.BigDecimal)(rt.cumulativeTrafficPurchasedCcSpent)
445432
} yield {
433+
// cumulativeChangeToInitialAmountAsOfRoundZero and cumulativeChangeToHoldingFeesRate are intentionally left out
434+
// since these do not match up anymore because amulet expires are attributed to the closed round at a later stage
435+
// in scan_txlog_store, at a time that can easily differ between SVs.
446436
ScanAggregator.RoundPartyTotals(
447437
closedRound = rt.closedRound,
448438
party = rt.party,
@@ -453,8 +443,6 @@ class SingleScanConnection private[client] (
453443
trafficNumPurchases = rt.trafficNumPurchases,
454444
cumulativeAppRewards = cumulativeAppRewards,
455445
cumulativeValidatorRewards = cumulativeValidatorRewards,
456-
cumulativeChangeToInitialAmountAsOfRoundZero = cumulativeChangeToInitialAmountAsOfRoundZero,
457-
cumulativeChangeToHoldingFeesRate = cumulativeChangeToHoldingFeesRate,
458446
cumulativeTrafficPurchased = rt.cumulativeTrafficPurchased,
459447
cumulativeTrafficPurchasedCcSpent = cumulativeTrafficPurchasedCcSpent,
460448
cumulativeTrafficNumPurchases = rt.cumulativeTrafficNumPurchases,

0 commit comments

Comments
 (0)