decred / dcrticketbuyer

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

Fails to buy, conflicting log msgs #74

Closed raedah closed 7 years ago

raedah commented 7 years ago

It says it has tickets queued, and then aborts saying all tickets have been purchased. This happens with every new block.

09:40:53 2016-11-10 [DBG] TKBY: The stake difficulty 22.23241839 Coin was below the target penalty cutoff 27.03236773; 60 many tickets have been queued for purchase

09:40:56 2016-11-10 [TRC] TKBY: All tickets have been purchased, aborting further ticket purchases

Also, the word 'many' is redundant grammar.

raedah commented 7 years ago

This is a re-occurance of issue https://github.com/decred/dcrticketbuyer/issues/21 pull https://github.com/decred/dcrticketbuyer/pull/55

raedah commented 7 years ago

[DBG] TKBY: The total ticket allotment left in this stakediff window is 48. So this wallet's possible tickets that could be bought is 56 so it has been reduced to 48. [DBG] TKBY: Tickets purchased so far in this window: 48 [DBG] TKBY: Tickets remaining to be purchased in this window: 8 [TRC] TKBY: All tickets have been purchased, aborting further ticket purchases

Its looking at how many have been purchased, rather then looking at the queue.

Problem is here https://github.com/decred/dcrticketbuyer/blob/master/buyer.go#L596

toBuyForBlock := t.toBuyDiffPeriod - t.purchasedDiffPeriod

raedah commented 7 years ago

This was closed by https://github.com/decred/dcrwallet/pull/501