Show tspend tx page even if it was not mined
xaur opened this issue · 1 comments
I checked the transaction page for our first real tspend (https://dcrdata.decred.org/tx/c322f3f93c8aa6d75846ea8ca1d7c9228d23bdef6c21413f8101e7922f265735) to see the count of Yes/No votes, but the page says
No matching page, block, address or transaction that could be found. that transaction has not been recorded
This is somewhat expected since it was never mined (due to consensus bug) and was removed from the mempool. But still it is now an important object in chain's history with thousands of on-chain votes cast for this tx.
I suggest to show the vote counts for the tx hash even if the tspend was not mined, because it is on-chain data and it is interesting. I guess showing the other data for an unmined tx requires to cache it somewhere. If possible, that would be nice too.
We can work toward a tspend votes table, but there's no way to show a proper /tx page for that tspend now. It is gone from the network, and dcrdata doesn't store any txns until they are mined.
However, the votes that encode a choice about a tspends are stored and they reference the tspend. e.g. https://dcrdata.decred.org/tx/763a3d8e619d2e767c2b9e65296aa560abb178e61132f1d4a3ae3d9d541ecd12
So we need a DB upgrade that reparses all historical votes, extracts the tspend choices, and stores those choices in a new "tspend_votes" table or similar.