-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add principal cache etag to account endpoints (#2097)
* feat: add principal cache * fix: also consider sponsor transactions * chore: import sponsors in migration * fix: add down migration
- Loading branch information
Showing
8 changed files
with
236 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* eslint-disable camelcase */ | ||
|
||
exports.shorthands = undefined; | ||
|
||
exports.up = pgm => { | ||
pgm.sql(` | ||
INSERT INTO principal_stx_txs | ||
(principal, tx_id, block_height, index_block_hash, microblock_hash, microblock_sequence, | ||
tx_index, canonical, microblock_canonical) | ||
( | ||
SELECT | ||
sponsor_address AS principal, tx_id, block_height, index_block_hash, microblock_hash, | ||
microblock_sequence, tx_index, canonical, microblock_canonical | ||
FROM txs | ||
WHERE sponsor_address IS NOT NULL | ||
) | ||
ON CONFLICT ON CONSTRAINT unique_principal_tx_id_index_block_hash_microblock_hash DO NOTHING | ||
`); | ||
}; | ||
|
||
exports.down = pgm => {}; |
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
Oops, something went wrong.