Commit a217c500 authored by Hamdi Allam's avatar Hamdi Allam

pointer for finalized l2 event

parent b4db3428
...@@ -33,7 +33,6 @@ type TokenPair struct { ...@@ -33,7 +33,6 @@ type TokenPair struct {
type Deposit struct { type Deposit struct {
GUID uuid.UUID `gorm:"primaryKey"` GUID uuid.UUID `gorm:"primaryKey"`
InitiatedL1EventGUID uuid.UUID InitiatedL1EventGUID uuid.UUID
FinalizedL2EventGUID uuid.UUID `gorm:"default:null"`
// Since we're only currently indexing a single StandardBridge, // Since we're only currently indexing a single StandardBridge,
// the message nonce serves as a unique identifier for this // the message nonce serves as a unique identifier for this
...@@ -43,6 +42,8 @@ type Deposit struct { ...@@ -43,6 +42,8 @@ type Deposit struct {
// for a bridge msg // for a bridge msg
SentMessageNonce U256 SentMessageNonce U256
FinalizedL2EventGUID *uuid.UUID
Tx Transaction `gorm:"embedded"` Tx Transaction `gorm:"embedded"`
TokenPair TokenPair `gorm:"embedded"` TokenPair TokenPair `gorm:"embedded"`
} }
...@@ -176,7 +177,7 @@ func (db *bridgeDB) MarkFinalizedDepositEvent(guid, finalizationEventGUID uuid.U ...@@ -176,7 +177,7 @@ func (db *bridgeDB) MarkFinalizedDepositEvent(guid, finalizationEventGUID uuid.U
return result.Error return result.Error
} }
deposit.FinalizedL2EventGUID = finalizationEventGUID deposit.FinalizedL2EventGUID = &finalizationEventGUID
result = db.gorm.Save(&deposit) result = db.gorm.Save(&deposit)
return result.Error return result.Error
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment