Helpful error messages if user confuses abandonclaim/abandonsupport #41
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
Epic
good first issue
hacktoberfest
hard fork
help wanted
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
soft fork
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
work in progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbrycrd#41
Loading…
Reference in a new issue
No description provided.
Delete branch "did-you-mean"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the user tries to use abandonclaim with with a support tx, or vice versa, give an informative error message to that effect.
I like the concept but altFound looks to be an unused variable here.
Whoooops. Good catch, thanks!
Fixed.
I'm reviewing this, and realized that there are some other issues, with the abandonclaim and supportclaim RPC command ...
I think first of all those commands will work regardless of what you are abandoning (abandonclaim should work on supports, abandonsupport should work on claims) , the code is exactly the same, except for the isminefilter which is not used actually. Which begs the question if we need two commands to do the same thing.
Second , txid should not be used here as multiple claims could in theory share the same txid (and have different vouts). So this command could end up abandoning claims that you want to keep.. Ideally we'd want to use claimId here... or at least txid + vout
I don't think abandonclaim and abandonsupport ought to be equivalent; I think it's a useful bit of syntactic salt. It might be possible to DRY out some redundant code, though.
Using claimId instead of txid is a good idea.
Nice, I will take a look int the next couple of days, kind of strange that the travis build failed though.. doesn't seem to be related to the patch
Unless there is some particularly good UX reason to use claimId, this should use txhash and nOut.
I've changed my mind. Txhash and nOut should be used regardless of any ux concerns.
Reasoning is that it's possible to have multiple txouts ( even in the same tx) with identical claimIDs. They could be valid supports, invalid updates, or a valid update and any number of invalid updates. In all of those cases it should be possible to uniquely specify the txout to spend.
I agree that we should use txhash and nout. On a side note, it looks like lbryum (and therefore lbrynet ) has this same problem where only txhash is used to specify what to abandon.
I also don't see the purpose of having two separate function abandonclaim and abandonsupport if we are going this route. It seems like abandon is sufficient.
Should this be closed?
Closing, will need to revisit when we are re writing the lbrycrd rpc calls but not high priority right now.
Pull request closed