-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
rpcClient: GetRawChangeAddress is broken with bitcoin core 0.15 #1058
Comments
I think it's weird that the RPC method for btcwallet are now part of btcd inside btcrpcclient. Is being API compatible with Core worth it? I mean maintaining a satoshirpcclient would not be that much work for the people in need of it. |
I have been considering dropping support for Core. It constantly changes the RPC API and doesn't have any versioning associated with it. The reason this fails is because they removed the account parameter, which You can create a local function in the calling code similar to the following to get around it though: func getRawChangeAddress(c *rpcclient.Client) (btcutil.Address, error) {
rawResp, err := c.RawRequest("getrawchangeaddress", nil)
if err != nil {
return nil, err
}
var addrStr string
err = json.Unmarshal(rawResp, &addrStr)
if err != nil {
return nil, err
}
addr, err := btcutil.DecodeAddress(addrStr, chainParams)
if err != nil {
return nil, err
}
if !addr.IsForNet(chainParams) {
return nil, fmt.Errorf("address %v is not intended for use on %v",
addrStr, chainParams.Name)
}
return addr, nil
} |
I'd be in favor of that. In that case, we could move all the wallet methods to |
The trouble is these methods are used in btcctl, which lives in btcd, and btcctl needs to implement the wallet methods. |
Hmm. What a mess. |
It previously took in an "account" and no longer does (and gives a hard error if you pass in anything)
The text was updated successfully, but these errors were encountered: