File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
cardano-db/src/Cardano/Db Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Revision history for cardano-db-sync
2
2
3
3
## 13.2.0.0
4
+ * Added a new table ` epoch_stake_progress ` which indicates when ` epoch_stake ` is completed
4
5
* Uses the cache for the computation of ` epoch ` table when following
5
6
* ` epoch_stake ` is now computed earlier, before the epoch is reached
6
7
* Exception handling and concurrency improved.
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ import Database.Persist.Class (
113
113
replaceUnique ,
114
114
)
115
115
import Database.Persist.EntityDef.Internal (entityDB , entityUniques )
116
+ import Database.Persist.Postgresql (upsertWhere )
116
117
import Database.Persist.Sql (
117
118
OnlyOneUniqueKey ,
118
119
PersistRecordBackend ,
@@ -352,7 +353,7 @@ insertEpochStakeProgress =
352
353
353
354
updateSetComplete :: MonadIO m => Word64 -> ReaderT SqlBackend m ()
354
355
updateSetComplete epoch = do
355
- updateWhere [ EpochStakeProgressEpochNo Database.Persist. ==. epoch ] [EpochStakeProgressCompleted Database.Persist. =. True ]
356
+ upsertWhere ( EpochStakeProgress epoch True ) [ EpochStakeProgressCompleted Database.Persist. =. True ] [EpochStakeProgressEpochNo Database.Persist. ==. epoch ]
356
357
357
358
updateGovActionEnacted :: MonadIO m => GovActionProposalId -> Word64 -> ReaderT SqlBackend m ()
358
359
updateGovActionEnacted gaid eNo =
Original file line number Diff line number Diff line change @@ -955,6 +955,11 @@ schemaDocs =
955
955
EpochStakeAmount # " The amount (in Lovelace) being staked."
956
956
EpochStakeEpochNo # " The epoch number."
957
957
958
+ EpochStakeProgress --^ do
959
+ " A table which shows when the epoch_stake for an epoch is complete"
960
+ EpochStakeProgressEpochNo # " The related epoch"
961
+ EpochStakeProgressCompleted # " True if completed. If not completed the entry won't exist or more rarely be False."
962
+
958
963
Treasury --^ do
959
964
" A table for payments from the treasury to a StakeAddress. Note: Before protocol version 5.0\
960
965
\ (Alonzo) if more than one payment was made to a stake address in a single epoch, only the\
You can’t perform that action at this time.
0 commit comments