Skip to content
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

Merged

Conversation

otselnik
Copy link
Contributor

No description provided.

@otselnik otselnik requested a review from afalaleev January 19, 2022 22:45
@otselnik otselnik self-assigned this Jan 19, 2022
@afalaleev afalaleev linked an issue Jan 20, 2022 that may be closed by this pull request
afalaleev
afalaleev previously approved these changes Jan 20, 2022
@@ -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)
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@afalaleev afalaleev merged commit 0409b80 into develop Jan 21, 2022
@afalaleev afalaleev deleted the 455_request_receipts_for_not_finalized_transactions branch January 21, 2022 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-request receipts for not-finalized transactions.
2 participants