You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some wallet methods in the rpcclient library have hardcoded the chaincfg.MainNetParams for example the GetNewAddress() method calls the Receive() method which hardcodes the MainNetParams when decoding the address:
func (r FutureGetNewAddressResult) Receive() (btcutil.Address, error) {
res, err := receiveFuture(r)
if err != nil {
return nil, err
}
// Unmarshal result as a string.
var addr string
err = json.Unmarshal(res, &addr)
if err != nil {
return nil, err
}
return btcutil.DecodeAddress(addr, &chaincfg.MainNetParams)
}
This returns an error when talking to btcwallet/btcd in --simnet mode.
Is there a way to tell the rpcclient to use SimnetParams when talking to a simnet server?
Potential way to fix this would be to allow the user to specify the network type when constructing the client:
Some wallet methods in the
rpcclient
library have hardcoded thechaincfg.MainNetParams
for example theGetNewAddress()
method calls theReceive()
method which hardcodes theMainNetParams
when decoding the address:This returns an error when talking to btcwallet/btcd in
--simnet
mode.Is there a way to tell the
rpcclient
to useSimnetParams
when talking to a simnet server?Potential way to fix this would be to allow the user to specify the network type when constructing the client:
The text was updated successfully, but these errors were encountered: