decred / dcrticketbuyer

An automated smart ticket purchaser.
0 stars 7 forks source link

fix maxinmempool default #62

Closed raedah closed 7 years ago

raedah commented 7 years ago

Match stated default: https://github.com/decred/dcrticketbuyer/blob/master/ticketbuyer-example.conf#L55

Closes https://github.com/decred/dcrticketbuyer/issues/60

jolan commented 7 years ago

Need to sync the 'Getting Started' section in README.md too. https://github.com/decred/dcrticketbuyer/#getting-started

It would make more sense to change the sample config rather than the default.

raedah commented 7 years ago

jolan, I disagree that changing the sample config rather then the default makes more sense. The value of 0 is not a usable value (no tickets will be bought), so is not a good default.

raedah commented 7 years ago

updated README. ready for merge.

alexlyp commented 7 years ago

From my testing, if the default is used (maxinmempool=0) then it purchases as many as you have set for maxperblock (default=3) then waits until all of those have been mined until attempting to purchase more. In my opinion, this is not only acceptable, but preferable.

Let's say you set the default maxinmempool to 40, highly likely that you would end up purchasing more tickets than were able to get mined (due to high tx fees most likely). Keeping this maxinmempool low lets users have more control over the needed ticket fee that is required for the tickets to get mined.

raedah commented 7 years ago

The problem with the 0 setting is it takes two blocks for a ticket to get mined. First the output creation tx, and then the actual sstx purchase tx. So with the value of 0, whatever the users sets the maxperblock to be will only occur every other block which is not how the setting is expected to perform. It was this issue that caused me to find the discrepancy in the actual default and the stated default.