-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
presync checkpointing for cardano cde
- Loading branch information
1 parent
e5a4b25
commit 94ddeaf
Showing
8 changed files
with
49 additions
and
66 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
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
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
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
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
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
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
16 changes: 6 additions & 10 deletions
16
packages/node-sdk/paima-db/src/sql/cde-tracking-cardano.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
/* @name markCardanoCdeSlotProcessed */ | ||
INSERT INTO cde_tracking_cardano(slot) | ||
VALUES (:slot!); | ||
INSERT INTO cde_tracking_cardano(id,slot) | ||
VALUES (0, :slot!) | ||
ON CONFLICT (id) | ||
DO UPDATE SET slot = :slot!; | ||
|
||
/* @name getCardanoSpecificCdeBlockheight */ | ||
SELECT * FROM cde_tracking_cardano | ||
WHERE slot = :slot!; | ||
|
||
/* @name getCardanoLatestProcessedCdeBlockheight */ | ||
SELECT * FROM cde_tracking_cardano | ||
ORDER BY slot DESC | ||
LIMIT 1; | ||
/* @name getCardanoLatestProcessedCdeSlot */ | ||
SELECT slot FROM cde_tracking_cardano LIMIT 1; |