Skip to content

Commit

Permalink
Merge pull request #11596 from vegaprotocol/11592
Browse files Browse the repository at this point in the history
fix: the order of calls at end of epoch between rebate engine and mar…
  • Loading branch information
ze97286 authored Aug 17, 2024
2 parents ff286ba + 8cc9335 commit a9c18c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
- [11544](https://github.com/vegaprotocol/vega/issues/11544) - Fix empty candles stream.
- [11579](https://github.com/vegaprotocol/vega/issues/11579) - Spot calculate fee on amend, use order price if no amended price is provided.
- [11585](https://github.com/vegaprotocol/vega/issues/11585) - Initialise rebate stats service in API.

- [11592](https://github.com/vegaprotocol/vega/issues/11592) - Fix the order of calls at end of epoch between rebate engine and market tracker.

## 0.77.5

Expand Down
3 changes: 1 addition & 2 deletions core/integration/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ func newExecutionTestSetup() *executionTestSetup {
execsetup.volumeDiscountProgram = volumediscount.New(execsetup.broker, execsetup.marketActivityTracker)
execsetup.epochEngine.NotifyOnEpoch(execsetup.volumeDiscountProgram.OnEpoch, execsetup.volumeDiscountProgram.OnEpochRestore)
execsetup.volumeRebateProgram = volumerebate.New(execsetup.broker, execsetup.marketActivityTracker)
execsetup.epochEngine.NotifyOnEpoch(execsetup.volumeRebateProgram.OnEpoch, execsetup.volumeRebateProgram.OnEpochRestore)

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)

Expand All @@ -228,7 +227,7 @@ func newExecutionTestSetup() *executionTestSetup {
execsetup.epochEngine.NotifyOnEpoch(execsetup.executionEngine.OnEpochEvent, execsetup.executionEngine.OnEpochRestore)
execsetup.epochEngine.NotifyOnEpoch(execsetup.marketActivityTracker.OnEpochEvent, execsetup.marketActivityTracker.OnEpochRestore)
execsetup.epochEngine.NotifyOnEpoch(execsetup.banking.OnEpoch, execsetup.banking.OnEpochRestore)

execsetup.epochEngine.NotifyOnEpoch(execsetup.volumeRebateProgram.OnEpoch, execsetup.volumeRebateProgram.OnEpochRestore)
execsetup.delegationEngine = delegation.New(execsetup.log, delegation.NewDefaultConfig(), execsetup.broker, execsetup.topology, execsetup.stakingAccount, execsetup.epochEngine, execsetup.timeService)

execsetup.activityStreak = activitystreak.New(execsetup.log, execsetup.executionEngine, execsetup.broker)
Expand Down
6 changes: 1 addition & 5 deletions core/protocol/all_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,6 @@ func newServices(
)

svcs.volumeRebate = volumerebate.NewSnapshottedEngine(svcs.broker, svcs.marketActivityTracker)
svcs.epochService.NotifyOnEpoch(
svcs.volumeRebate.OnEpoch,
svcs.volumeRebate.OnEpochRestore,
)

svcs.banking = banking.New(svcs.log, svcs.conf.Banking, svcs.collateral, svcs.witness, svcs.timeService,
svcs.assets, svcs.notary, svcs.broker, svcs.topology, svcs.marketActivityTracker, svcs.primaryBridgeView,
svcs.secondaryBridgeView, svcs.forwarderHeartbeat, svcs.partiesEngine)
Expand All @@ -352,6 +347,7 @@ func newServices(
svcs.epochService.NotifyOnEpoch(svcs.executionEngine.OnEpochEvent, svcs.executionEngine.OnEpochRestore)
svcs.epochService.NotifyOnEpoch(svcs.marketActivityTracker.OnEpochEvent, svcs.marketActivityTracker.OnEpochRestore)
svcs.epochService.NotifyOnEpoch(svcs.banking.OnEpoch, svcs.banking.OnEpochRestore)
svcs.epochService.NotifyOnEpoch(svcs.volumeRebate.OnEpoch, svcs.volumeRebate.OnEpochRestore)

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

Expand Down

0 comments on commit a9c18c7

Please sign in to comment.