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

Problem: no command to patch the duplicated tx situation #521

Closed
yihuang opened this issue May 30, 2022 · 0 comments
Closed

Problem: no command to patch the duplicated tx situation #521

yihuang opened this issue May 30, 2022 · 0 comments

Comments

@yihuang
Copy link
Collaborator

yihuang commented May 30, 2022

The patch logic like this should work:

for blockResult in blockResults:
    for txResult in blockResult.TxDeliverResponses:
        if txResult.code != txIndexer.get(txResult.txHash).code:
            if txResult.code == 0:
                # a success tx is overridden by a failure result, override the indexes by reindex the result
                txIndexer.Index(txResult)
yihuang added a commit to yihuang/cronos that referenced this issue May 30, 2022
Closes: crypto-org-chain#521
Solution:
- add reindex-duplicated-tx command
yihuang added a commit to yihuang/cronos that referenced this issue Jun 6, 2022
Closes: crypto-org-chain#521
Solution:
- add reindex-duplicated-tx command
yihuang added a commit that referenced this issue Jun 6, 2022
* Problem: no command to patch the duplicated tx situation

Closes: #521
Solution:
- add reindex-duplicated-tx command

* reuse tmDB from fix-unlucky-tx

* Update cmd/cronosd/cmd/reindex-duplicated-tx.go

* Revert "Update cmd/cronosd/cmd/reindex-duplicated-tx.go"

This reverts commit e605d3c.

* fix lint

* Update cmd/cronosd/cmd/reindex-duplicated-tx.go
@yihuang yihuang closed this as completed Jun 6, 2022
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

No branches or pull requests

1 participant