Skip to content

Commit

Permalink
Merge pull request #10239 from vegaprotocol/10238-fix-no-state-logic-…
Browse files Browse the repository at this point in the history
…for-spam-request

logic fix for identifying empty state
  • Loading branch information
ValentinTrinque authored Dec 11, 2023
2 parents 0d52f1a + 8381b0a commit 22ca0b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
- [10205](https://github.com/vegaprotocol/vega/issues/10205) - Fix for transfer discount fees.
- [10211](https://github.com/vegaprotocol/vega/issues/10211) - Ensure infra fees don't get counted for vesting.
- [10217](https://github.com/vegaprotocol/vega/issues/10217) - Game ID for reward entity should be optional
- [10238](https://github.com/vegaprotocol/vega/issues/10238) - Fix logic when a user firsts requests spam information
- [10227](https://github.com/vegaprotocol/vega/issues/10227) - Make the wallet errors on spam stats meaningful.
- [10193](https://github.com/vegaprotocol/vega/issues/10193) - Denormalize `tx_results` to avoid joins with blocks when queried.
- [10233](https://github.com/vegaprotocol/vega/issues/10233) - Fix expiring stop orders panic.
Expand Down
7 changes: 3 additions & 4 deletions core/pow/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,11 +761,10 @@ func (e *Engine) GetSpamStatistics(partyID string) *protoapi.PoWStatistic {

for _, state := range e.activeStates {
for block, blockToPartyState := range state.blockToPartyState {
if block == e.currentBlock {
currentBlockStatsExists = true
}

if partyState, ok := blockToPartyState[partyID]; ok {
if block == e.currentBlock {
currentBlockStatsExists = true
}
blockIndex := block % ringSize
params := getParamsForBlock(block, e.activeParams)

Expand Down

0 comments on commit 22ca0b9

Please sign in to comment.