-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#455 rewrite transaction reciept with finalized data #465
#455 rewrite transaction reciept with finalized data #465
Conversation
…ts_for_not_finalized_transactions
proxy/indexer/indexer_db.py
Outdated
@@ -59,21 +60,21 @@ def _fill_block_from_net(self, block: SolanaBlockDBInfo): | |||
block.signs = net_block['signatures'] | |||
block.parent_hash = '0x' + base58.b58decode(net_block['previousBlockhash']).hex() | |||
block.time = net_block['blockTime'] | |||
block.finalized = ("confirmed" == FINALIZED) | |||
block.finalized = (commitment == FINALIZED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error in this place.
The block can be loaded from DB with the finalized status, but here it is overwritten.
Here should be:
block.finalized = block.finalized or ('confirmed' == FINALIZED)
In this case:
- Indexer saves blocks and txs with finalized status
- Sender saves blocks and txs with confirmed status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
No description provided.