dcrd/blockchain/stake
Dave Collins e53d26e01d
stake: Correct treasury enabled vote discovery.
This modifies FindSpentTicketsInBlock to also properly detect votes that
include information to vote on treasury spends as intended.

It should be noted that this commit only corrects the function and the
issue does not affect consensus in a way that could lead to an
unintended fork.

However, the incorrect behavior does mean the stake ticket database and
block index now have invalid entries in them that will be corrected via
a database migration in a separate commit.

More specifically, the behavior has resulted in the ticket database
incorrectly marking the associated tickets as missed instead of voted,
but that information is only used for serving RPC data.  The live ticket
pool is still accurate and all votes and payouts are unaffected.

Further, the associated data in the block index is only used when
tallying vote information and since an upgrade is required before a new
vote can start anyway, it will necessarily be resolved prior to that
point.
2021-11-10 07:32:11 -06:00
..
internal multi: avoid using subscriber lifecycle in catchup. 2021-10-12 18:52:50 -05:00
testdata multi: Only use module-scoped data in tests. 2018-08-16 15:08:07 -05:00
doc.go stake: Make doc.go formatting consistent. 2019-07-28 14:39:09 -05:00
error_test.go multi: avoid using subscriber lifecycle in catchup. 2021-10-12 18:52:50 -05:00
error.go stake: Add auto revocation error kinds. 2021-09-06 08:48:19 -05:00
go.mod multi: Don't use deprecated ioutil package. 2021-09-01 06:09:37 -05:00
go.sum multi: Don't use deprecated ioutil package. 2021-09-01 06:09:37 -05:00
log.go stake: Remove DisableLog. 2019-07-28 14:39:11 -05:00
lottery_test.go multi: Start blockchain/stake v4 module dev cycle. 2020-12-16 16:30:24 -06:00
lottery.go stake: Export Hash256PRNG UniformRandom. 2021-09-06 08:48:19 -05:00
scripttype_test.go stake: Add is treasury gen script. 2021-06-10 15:26:01 -05:00
scripttype.go stake: Add is treasury gen script. 2021-06-10 15:26:01 -05:00
staketx_test.go multi: DCP0009 Auto revocations consensus change. 2021-09-20 18:02:19 -05:00
staketx.go stake: Correct treasury enabled vote discovery. 2021-11-10 07:32:11 -06:00
tickets_test.go multi: Add isAutoRevocationsEnabled to CheckSSRtx. 2021-09-06 09:03:27 -05:00
tickets.go blockchain: Fix ticket db disconnect revocations. 2021-10-28 03:13:27 -05:00
treasury_test.go stake: Convert to use new stdaddr package. 2021-04-09 13:39:16 -05:00
treasury.go stake: Do not use standardness code in consensus. 2021-06-10 15:16:23 -05:00