dcrdata v6 module reorganization treasury TODOs #1796
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This supersedes #1795.
This nukes most of the old dcrdata modules and reorganizes large portions of the source. There are now 4 modules that are imported by another cmd/dcrdata module:
The dcrdata main package is moved into cmd/dcrdata, and several packages only usable by the app (middleware, explorer, api (but not api/types), etc.) are put under that module as well.
This also has some basic but incomplete handing for the three new treasury types, and lots of TODOs. The inputs and outputs of the Treasurybase, Treasury Spend, and Treasury Add txn types are not handled properly yet. The /block page also needs 3 new txn categories. The new vote version with a final nulldata output (e.g. https://testnet.dcrdata.org/tx/abde4c69df11cd0bce45a1ad729801afd75b270a05f55ae68defc3f910ab8c02) should also have special handling, such as deciding the treasury vote's position on a particular tspend.