Open
Conversation
This is in anticipation of the file containing more generic version functionality soon.
Checks were already in place for RPC version, but this was not sufficient to ensure that the binaries have actually been updated. New checks will now enforce the binary and RPC versions of the directly connected dcrd and dcrwallet, and also the dcrd which is backing the connected dcrwallets.
It was already enforced by version checks in the code but not called out in the docs.
jrick
reviewed
Dec 18, 2025
| // version uses version RPC to retrieve the API version of dcrwallet. | ||
| func (c *WalletRPC) version() (*semver, error) { | ||
| var verMap map[string]dcrdtypes.VersionResult | ||
| err := c.Call(context.TODO(), "version", &verMap) |
Member
There was a problem hiding this comment.
instead of introducing even more TODO, why not write this with context support and pass in TODO from the caller, if that is still needed?
Member
Author
There was a problem hiding this comment.
I might just be naive here, but I believe the reality of the situation is that context just isn't needed in these RPC clients.
None of the calls are particularly long running, and in every case I think adding early interruption adds more complexity than its worth. The code is kept cleaner and data integrity is protected if we allow vspd to finish what it is doing before shutting down.
The one thing I might consider is adding a timeout to the context, but the underlying context would still be TODO or Background anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checks were already in place for RPC version, but this was not sufficient to ensure that the binaries have actually been updated. New checks will now enforce the binary and RPC versions of the directly connected dcrd and dcrwallet, and also the dcrd which is backing the connected dcrwallets.