Skip to content

Commit

Permalink
Always use configured voting account when mixing
Browse files Browse the repository at this point in the history
The comments suggested that this was the intended behavior, but the voting
account option was only being considered when UseVotingAccount (allowing the
option to be used in non-mixing situations) was true, and mixed ticketbuying
was not setting this value.
  • Loading branch information
jrick committed Sep 16, 2024
1 parent 532aa67 commit 17dd448
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions wallet/createtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -1510,13 +1510,13 @@ func (w *Wallet) purchaseTickets(ctx context.Context, op errors.Op,

var addrVote stdaddr.StakeAddress

// If req.UseVotingAccount is true, derive the submission
// script's address from the voting account. This is intended
// to be used with a special account type. The signing address
// for the same index is saved to the database. That address is
// later used to sign messages sent to a vspd related to this
// ticket.
if req.UseVotingAccount {
// If req.Mixing or req.UseVotingAccount is true, derive the
// submission script's address from the voting account. This
// is intended to be used with a special account type. The
// signing address for the same index is saved to the
// database. That address is later used to sign messages sent
// to a vspd related to this ticket.
if req.Mixing || req.UseVotingAccount {
var idx uint32
addrVote, idx, err = stakeAddrFunc(op, req.VotingAccount, 1)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ type PurchaseTicketsRequest struct {
SourceAccount uint32
MinConf int32
Expiry int32
VotingAccount uint32 // Used when Mixing == true
VotingAccount uint32 // Used when Mixing == true || UseVotingAccount == true
UseVotingAccount bool // Forces use of supplied voting account.
DontSignTx bool

Expand Down

0 comments on commit 17dd448

Please sign in to comment.