Open jrick opened 6 years ago
Can I get this one?
@jrick I think this wasn't taken yet so I've made this enhancement inside #1137 PR as part of voting xpub account implementation with condition
if !w.VotingEnabled() && w.TicketAddress() == nil && !w.VotingAccountEnabled() {
// Throw error if non-voting wallet has no voting address or voting account configured
return nil, rpcErrorf(dcrjson.ErrRPCInvalidParameter, "non-voting wallet must have " +
"configured voting address or voting account")
}
If a wallet is not in voting mode, all RPCs to purchase tickets should error when not either provided an explicit voting address to use, or the wallet is not configured to create voting addresses from an address/xpub set in the config.
This change is being prompted by the fact that SPV wallets will not vote, so they should not generate one of their own addresses as a voting address without going through additional hoops.