Skip to content

Commit a9c18c7

Browse files
authored
Merge pull request #11596 from vegaprotocol/11592
fix: the order of calls at end of epoch between rebate engine and mar…
2 parents ff286ba + 8cc9335 commit a9c18c7

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
- [11544](https://github.com/vegaprotocol/vega/issues/11544) - Fix empty candles stream.
4141
- [11579](https://github.com/vegaprotocol/vega/issues/11579) - Spot calculate fee on amend, use order price if no amended price is provided.
4242
- [11585](https://github.com/vegaprotocol/vega/issues/11585) - Initialise rebate stats service in API.
43-
43+
- [11592](https://github.com/vegaprotocol/vega/issues/11592) - Fix the order of calls at end of epoch between rebate engine and market tracker.
4444

4545
## 0.77.5
4646

core/integration/setup_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ func newExecutionTestSetup() *executionTestSetup {
201201
execsetup.volumeDiscountProgram = volumediscount.New(execsetup.broker, execsetup.marketActivityTracker)
202202
execsetup.epochEngine.NotifyOnEpoch(execsetup.volumeDiscountProgram.OnEpoch, execsetup.volumeDiscountProgram.OnEpochRestore)
203203
execsetup.volumeRebateProgram = volumerebate.New(execsetup.broker, execsetup.marketActivityTracker)
204-
execsetup.epochEngine.NotifyOnEpoch(execsetup.volumeRebateProgram.OnEpoch, execsetup.volumeRebateProgram.OnEpochRestore)
205204

206205
execsetup.banking = banking.New(execsetup.log, banking.NewDefaultConfig(), execsetup.collateralEngine, execsetup.witness, execsetup.timeService, execsetup.assetsEngine, execsetup.notary, execsetup.broker, execsetup.topology, execsetup.marketActivityTracker, stubs.NewBridgeViewStub(), stubs.NewBridgeViewStub(), eventHeartbeat, execsetup.profilesEngine)
207206

@@ -228,7 +227,7 @@ func newExecutionTestSetup() *executionTestSetup {
228227
execsetup.epochEngine.NotifyOnEpoch(execsetup.executionEngine.OnEpochEvent, execsetup.executionEngine.OnEpochRestore)
229228
execsetup.epochEngine.NotifyOnEpoch(execsetup.marketActivityTracker.OnEpochEvent, execsetup.marketActivityTracker.OnEpochRestore)
230229
execsetup.epochEngine.NotifyOnEpoch(execsetup.banking.OnEpoch, execsetup.banking.OnEpochRestore)
231-
230+
execsetup.epochEngine.NotifyOnEpoch(execsetup.volumeRebateProgram.OnEpoch, execsetup.volumeRebateProgram.OnEpochRestore)
232231
execsetup.delegationEngine = delegation.New(execsetup.log, delegation.NewDefaultConfig(), execsetup.broker, execsetup.topology, execsetup.stakingAccount, execsetup.epochEngine, execsetup.timeService)
233232

234233
execsetup.activityStreak = activitystreak.New(execsetup.log, execsetup.executionEngine, execsetup.broker)

core/protocol/all_services.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,6 @@ func newServices(
334334
)
335335

336336
svcs.volumeRebate = volumerebate.NewSnapshottedEngine(svcs.broker, svcs.marketActivityTracker)
337-
svcs.epochService.NotifyOnEpoch(
338-
svcs.volumeRebate.OnEpoch,
339-
svcs.volumeRebate.OnEpochRestore,
340-
)
341-
342337
svcs.banking = banking.New(svcs.log, svcs.conf.Banking, svcs.collateral, svcs.witness, svcs.timeService,
343338
svcs.assets, svcs.notary, svcs.broker, svcs.topology, svcs.marketActivityTracker, svcs.primaryBridgeView,
344339
svcs.secondaryBridgeView, svcs.forwarderHeartbeat, svcs.partiesEngine)
@@ -352,6 +347,7 @@ func newServices(
352347
svcs.epochService.NotifyOnEpoch(svcs.executionEngine.OnEpochEvent, svcs.executionEngine.OnEpochRestore)
353348
svcs.epochService.NotifyOnEpoch(svcs.marketActivityTracker.OnEpochEvent, svcs.marketActivityTracker.OnEpochRestore)
354349
svcs.epochService.NotifyOnEpoch(svcs.banking.OnEpoch, svcs.banking.OnEpochRestore)
350+
svcs.epochService.NotifyOnEpoch(svcs.volumeRebate.OnEpoch, svcs.volumeRebate.OnEpochRestore)
355351

356352
svcs.gastimator = processor.NewGastimator(svcs.executionEngine)
357353

0 commit comments

Comments
 (0)