-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save identity known heights from people chain, #960
- Loading branch information
1 parent
a2cf1df
commit 4b9046e
Showing
4 changed files
with
26 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
require("dotenv").config(); | ||
|
||
const { | ||
utils: { saveHeightsCommon }, | ||
} = require("@statescan/common"); | ||
const { saveIdentityHeights } = require("./identity"); | ||
const { saveRequestHeights } = require("./request"); | ||
const { | ||
identity: { getRegistrarsTimelineCol }, | ||
} = require("@statescan/mongo"); | ||
const { | ||
env: { currentChain }, | ||
mongo: { | ||
known: { saveKnownHeights, getKnownHeightDb }, | ||
}, | ||
} = require("@osn/scan-common"); | ||
const { saveHeights } = require("./save"); | ||
|
||
const knownHeights = Object.freeze({ | ||
polkadot: [22572436], | ||
kusama: [23780225], | ||
}); | ||
|
||
(async () => { | ||
await saveIdentityHeights(); | ||
await saveRequestHeights(); | ||
await saveHeightsCommon(await getRegistrarsTimelineCol()); | ||
await saveHeights(await getRegistrarsTimelineCol()); | ||
|
||
const known = knownHeights[currentChain()]; | ||
await saveKnownHeights(known); | ||
process.exit(0); | ||
})(); |
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