Skip to content

Commit

Permalink
Commitment Model extended
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsereda committed Feb 4, 2024
1 parent fb57b41 commit f1b0e09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bridge_indexer/handlers/tezos/on_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ async def update_commitment(ctx):
defaults={
'inbox_level': commitment_data[0]['inboxLevel'],
'first_level': commitment_data[0]['firstLevel'],
'first_time': commitment_data[0]['firstTime'],
'last_level': commitment_data[0]['lastLevel'],
'last_time': commitment_data[0]['lastTime'],
'state': commitment_data[0]['state'],
'hash': commitment_data[0]['hash'],
'status': commitment_data[0]['status'],
},
)

Expand Down
4 changes: 4 additions & 0 deletions bridge_indexer/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ class Meta:
id = fields.BigIntField(pk=True)
inbox_level = fields.IntField()
first_level = fields.IntField()
first_time = fields.DatetimeField()
last_level = fields.IntField()
last_time = fields.DatetimeField()
state = fields.CharField(max_length=54)
hash = fields.CharField(max_length=54)
status = fields.CharField(max_length=16)


class AbstractRollupMessage(Model):
Expand All @@ -77,6 +80,7 @@ class Meta:
'level',
'index',
)
ordering = ['level', 'index']

id = fields.BigIntField(pk=True)
level = fields.IntField(index=True)
Expand Down

0 comments on commit f1b0e09

Please sign in to comment.