Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db-sync: Fix pool_id column in reward table
The 'pool_id' in the 'reward' table is obtained by querying the 'delegation' table, and that query ordered the results by 'active_epoch_no'. However, for the case where two delegation (or pool update) certificates for the same address (or pool) are registered in the same epoch, this query can be incorrect. The fix is join with the 'block' table and order by the descending value of the 'slot_no' field. Closes: #361
- Loading branch information
Showing
1 changed file
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters