123456789101112131415 |
- import { connectUpstream } from './joystream/ws'
- import { addBlockRange } from './joystream'
- const main = async () => {
- const args = process.argv.slice(2)
- if (args.length !== 2) return
- const startBlock = +args[0]
- const endBlock = +args[1]
- console.log(`[Joystream] Syncing blocks from ${startBlock} to ${endBlock}`)
- const api = await connectUpstream()
- await api.isReady
- addBlockRange(api, startBlock, endBlock)
- }
- main()
|