mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-23 03:00:50 -04:00
feat: fix l2 update error
This commit is contained in:
@@ -196,8 +196,8 @@ func (b *EventUpdateLogic) UpdateL1BatchIndexAndStatus(ctx context.Context, heig
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateL1BridgeBatchDepositEvent update l1 bridge batch deposit status
|
||||
func (b *EventUpdateLogic) UpdateL1BridgeBatchDepositEvent(ctx context.Context, l2BatchDistributes []*orm.BridgeBatchDepositEvent) error {
|
||||
// UpdateL2BridgeBatchDepositEvent update l2 bridge batch deposit status
|
||||
func (b *EventUpdateLogic) UpdateL2BridgeBatchDepositEvent(ctx context.Context, l2BatchDistributes []*orm.BridgeBatchDepositEvent) error {
|
||||
batchIndexMap := make(map[uint64]*orm.BridgeBatchDepositEvent)
|
||||
distributeFailedMap := make(map[uint64][]string)
|
||||
for _, l2BatchDistribute := range l2BatchDistributes {
|
||||
|
||||
@@ -135,6 +135,7 @@ func (c *BridgeBatchDepositEvent) UpdateBatchEventStatus(ctx context.Context, di
|
||||
db := c.db.WithContext(ctx)
|
||||
db = db.Model(&BridgeBatchDepositEvent{})
|
||||
db = db.Where("batch_index = ?", distributeMessage.BatchIndex)
|
||||
db = db.Where("token_type = ?", distributeMessage.TokenType)
|
||||
updateFields := map[string]interface{}{
|
||||
"l2_token_address": distributeMessage.L2TokenAddress,
|
||||
"l2_block_number": distributeMessage.L2BlockNumber,
|
||||
|
||||
Reference in New Issue
Block a user