Skip to content

Commit 28444d2

Browse files
committed
fix queued_withdrawal_slashing_adjustments primary key and CSA tests
1 parent 0d2fd48 commit 28444d2

File tree

7 files changed

+371
-182
lines changed

7 files changed

+371
-182
lines changed

pkg/eigenState/precommitProcessors/slashingProcessor/slashing.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ func (sp *SlashingProcessor) createSlashingAdjustments(slashEvent *SlashingEvent
165165
qsw.strategy,
166166
qsw.operator,
167167
qsw.block_number as withdrawal_block_number,
168+
qsw.log_index as withdrawal_log_index,
168169
@slashBlockNumber as slash_block_number,
169170
-- Calculate cumulative slash multiplier: previous multipliers * (1 - current_slash)
170171
COALESCE(
@@ -174,6 +175,7 @@ func (sp *SlashingProcessor) createSlashingAdjustments(slashEvent *SlashingEvent
174175
AND adj.strategy = qsw.strategy
175176
AND adj.operator = qsw.operator
176177
AND adj.withdrawal_block_number = qsw.block_number
178+
AND adj.withdrawal_log_index = qsw.log_index
177179
ORDER BY adj.slash_block_number DESC
178180
LIMIT 1),
179181
1
@@ -244,6 +246,7 @@ func (sp *SlashingProcessor) createSlashingAdjustments(slashEvent *SlashingEvent
244246
Strategy string
245247
Operator string
246248
WithdrawalBlockNumber uint64
249+
WithdrawalLogIndex uint64
247250
SlashBlockNumber uint64
248251
SlashMultiplier string
249252
BlockNumber uint64

0 commit comments

Comments
 (0)