v2.1: tpu-client-next: return receiver in scheduler::run (backport of #4454) #4521
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem & Solution
Return receiver from scheduler run so that it can be reused if required. This is needed to use in validator because user can make an rpc call to update underlying authority, and due to the way this mechanism is implemented, we have to reutilize the same receiver.
These changes are part of the reverted PR https://github.com/anza-xyz/agave/pull/3515/files#diff-17507818c3be9c444eb55f6c0b2d82ac0662746abf0dff6b200d43bf9ca125c2
They are split into a separate PR for the sake of backporting and to have a clearer history.
This is an automatic backport of pull request #4454 done by [Mergify](https://mergify.com).