-
Notifications
You must be signed in to change notification settings - Fork 293
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
dcrjson: add listtickets command #1267
Conversation
bf692ed
to
4327d49
Compare
dcrjson/walletsvrcmds.go
Outdated
type ListTicketsCmd struct { | ||
} | ||
|
||
// NewListAccountsCmd returns a new instance which can be used to issue a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// NewListTicketsCmd ...
dcrjson/walletsvrresults.go
Outdated
Hash string `json:"hash"` | ||
Transaction string `json:"transaction"` | ||
MyInputs []ListTicketsTransactionSummaryInput `json:"my_inputs"` | ||
MyOutputs []ListTicketsTransactionSummaryOutput `json:"my_outputs"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the "My
" prefix is confusing. These would be clear as just Inputs
and Outputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was initially here https://github.com/decred/dcrwallet/blob/master/wallet/notifications.go#L465
@chappjc @jrick do I also have to remove it in txsummary to keep code consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chappjc the "My" names just mean they are inputs or outputs relevant to the wallet, it doesn't necessarily include all inputs and outputs from the transaction. If you are familiar with what wallet calls "credits" and "debits" internally, these are the same thing.
@kLkA please remove the underscores in the json keys, none of the other messages use them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha
0a85512
to
e2b0171
Compare
e2b0171
to
88ca6b1
Compare
7a94973
to
007f218
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to approve this, as the code is correct, but decided against it, because if we don't stick with the established style standards, the code base is going to become increasingly inconsistent over time and thus deteriorate
Please define the types before they are used to be consistent with the vast majority of the dcrd code. There are certainly a few exceptions that have slipped through, but it is not the norm.
e.g.
type ListTicketsTransactionSummaryInput struct {
...
}
type ListTicketsTransactionSummaryOutput struct {
...
}
type ListTicketsTransactionSummary struct {
...
}
type ListTicketsResult struct {
...
}
current wallet with ticket, spender transactions' info and status
007f218
to
06b18cd
Compare
…ding_updates txscript: Cleanup strict signature enforcement.
related to decred/dcrwallet#1168