-
Notifications
You must be signed in to change notification settings - Fork 296
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 fundrawtransaction command #1316
Conversation
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.
While we will have less options than bitcoind, we should still use a single second parameter with a JSON object of optional parameters instead of making all of the options positional parameters.
aed10ff
to
20506e1
Compare
20506e1
to
1bdf1cc
Compare
I changed to use just one parameter, now I believe this PR is ready for another review. |
@@ -240,6 +240,33 @@ func NewEstimatePriorityCmd(numBlocks int64) *EstimatePriorityCmd { | |||
} | |||
} | |||
|
|||
// FundRawTransactionOptions represents the optional inputs to fund | |||
// a raw transaction. | |||
type FundRawTransactionOptions struct { |
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 type must use json:"..."
struct tags to provide the key name
dcrjson/walletsvrcmds.go
Outdated
// FundRawTransactionOptions represents the optional inputs to fund | ||
// a raw transaction. | ||
type FundRawTransactionOptions struct { | ||
ChangeAccount *string |
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.
The change account is not part of the equivalent bitcoind RPC (instead, any address can be provided as an option). Why is this different?
dcrjson/walletsvrcmds.go
Outdated
// a raw transaction. | ||
type FundRawTransactionOptions struct { | ||
ChangeAccount *string | ||
LockUnspents *bool `jsonrpcdefault:"false"` |
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.
Let's not add this for now. Locking outputs doesn't actually work in dcrwallet currently.
dcrjson/walletsvrcmds.go
Outdated
ChangeAccount *string | ||
LockUnspents *bool `jsonrpcdefault:"false"` | ||
FeeRate *float64 | ||
RequiredConfirmations *int32 |
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.
bitcoind names this conf_target
.
fixed |
connmanager: check Addr for nil
related to decred/dcrwallet#1195