Allow running either the new or old ticket buyer. #470

Merged
merged 2 commits into from Dec 20, 2016

Projects

None yet

2 participants

@jrick
Member
jrick commented Dec 19, 2016

An --enableticketbuyer option has been added. It must be used to
enable the new ticket buyer.

An --enablevoting option has been added to turn on the wallet's
automatic creation of vote and revocation transactions when using the
new ticket purchaser.

The --enablestakemining option has been deprecated for the above two
options. To use the old ticket buyer from the wallet package, use
this option and do NOT set --enableticketbuyer (doing so would enable
the new ticket buyer).

All RPCs to interact with the ticket buyer remain, but only affect the
old deprecated ticket buyer, and are also deprecated by extension.

Fixes #468.

@jrick jrick Allow running either the new or old ticket buyer.
An --enableticketbuyer option has been added.  It must be used to
enable the new ticket buyer.

An --enablevoting option has been added to turn on the wallet's
automatic creation of vote and revocation transactions when using the
new ticket purchaser.

The --enablestakemining option has been deprecated for the above two
options.  To use the old ticket buyer from the wallet package, use
this option and do NOT set --enableticketbuyer (doing so would enable
the new ticket buyer).

All RPCs to interact with the ticket buyer remain, but only affect the
old deprecated ticket buyer, and are also deprecated by extension.

Fixes #468.
66710f7
wallet/wallet.go
+ ticketPurchasingEnabled := w.TicketPurchasingEnabled()
+ if ticketPurchasingEnabled {
+ log.Infof("Wallet ticket purchasing enabled: vote bits = %v, "+
+ "balance to maintain = %v", w.VoteBits, w.BalanceToMaintain)
@alexlyp
alexlyp Dec 20, 2016 Member

Should be w.BalanceToMaintain() or w.BalanceToMaintain().ToCoin()

@alexlyp
alexlyp Dec 20, 2016 Member

Also should display w.GetTicketMaxPrice().ToCoin() in this situation as well

@jrick
jrick Dec 20, 2016 Member

BalanceToMaintain is an Amount which is already a fmt.Stringer. This is technically a change in behavior, but it's just logs, and the only real difference will be the addition of "Coin" in the message.

@jrick
jrick Dec 20, 2016 Member

nvm I see my mistake. fixing.

@alexlyp

OK now

@jrick jrick merged commit 879e068 into decred:master Dec 20, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jrick jrick deleted the jrick:ticketbuyercfg branch Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment