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

Return error when trying to incentivize an already relayed packet #1318

Closed
crodriguezvega opened this issue May 1, 2022 · 1 comment · Fixed by #1347
Closed

Return error when trying to incentivize an already relayed packet #1318

crodriguezvega opened this issue May 1, 2022 · 1 comment · Fixed by #1347
Assignees
Labels

Comments

@crodriguezvega
Copy link
Contributor

To prevent that a packet that has already been relayed can still be incentivized (and therefore fees end up being locked up forever), on PayPacketFeeAsync, if the NextSequenceSend is greater than the packet sequence that is intended to be incentivized AND the packet commitment does not exist (since packet commitments are deleted when packets are acknowledged or timed out), return an error.

@colin-axner
Copy link
Contributor

if packet is not sent {
    return err
}

if packet acknowledged || timed out {
    return err
}

@colin-axner colin-axner moved this from Todo to In review in ibc-go May 11, 2022
@mergify mergify bot closed this as completed in #1347 May 12, 2022
mergify bot pushed a commit that referenced this issue May 12, 2022
…been already relayed (#1347)

## Description



closes: #1318 

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
Repository owner moved this from In review to Done in ibc-go May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
2 participants