Skip to content

Commit de63d36

Browse files
committed
docs: fix typos and improve comments in EventUpdateLogic
1 parent 6b837c0 commit de63d36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bridge-history-api/internal/logic/event_update.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"scroll-tech/bridge-history-api/internal/utils"
1616
)
1717

18-
// EventUpdateLogic the logic of insert/update the database
18+
// EventUpdateLogic contains logic for inserting and updating database records.
1919
type EventUpdateLogic struct {
2020
db *gorm.DB
2121
crossMessageOrm *orm.CrossMessage
@@ -26,7 +26,7 @@ type EventUpdateLogic struct {
2626
eventUpdateLogicL2MessageNonceUpdateHeight prometheus.Gauge
2727
}
2828

29-
// NewEventUpdateLogic creates a EventUpdateLogic instance
29+
// NewEventUpdateLogic creates a new EventUpdateLogic instance.
3030
func NewEventUpdateLogic(db *gorm.DB, isL1 bool) *EventUpdateLogic {
3131
b := &EventUpdateLogic{
3232
db: db,
@@ -50,7 +50,7 @@ func NewEventUpdateLogic(db *gorm.DB, isL1 bool) *EventUpdateLogic {
5050
return b
5151
}
5252

53-
// GetL1SyncHeight gets the l1 sync height from db
53+
// GetL1SyncHeight returns the L1 sync height from the database.
5454
func (b *EventUpdateLogic) GetL1SyncHeight(ctx context.Context) (uint64, uint64, uint64, error) {
5555
messageSyncedHeight, err := b.crossMessageOrm.GetMessageSyncedHeightInDB(ctx, btypes.MessageTypeL1SentMessage)
5656
if err != nil {
@@ -219,7 +219,7 @@ func (b *EventUpdateLogic) UpdateL2WithdrawMessageProofs(ctx context.Context, he
219219
return nil
220220
}
221221

222-
// UpdateL2BridgeBatchDepositEvent update l2 bridge batch deposit status
222+
// UpdateL2BridgeBatchDepositEvent updates the status of L2 bridge batch deposit events.
223223
func (b *EventUpdateLogic) UpdateL2BridgeBatchDepositEvent(ctx context.Context, l2BatchDistributes []*orm.BridgeBatchDepositEvent) error {
224224
distributeFailedMap := make(map[uint64][]string)
225225
for _, l2BatchDistribute := range l2BatchDistributes {

0 commit comments

Comments
 (0)