Skip to content

Instantly share code, notes, and snippets.

@AndrewWestberg
Created December 18, 2019 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewWestberg/9a25e238184d5cfc06cd1d49d9f57239 to your computer and use it in GitHub Desktop.
Save AndrewWestberg/9a25e238184d5cfc06cd1d49d9f57239 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /home/westbam/cardano/storage
sqlite3 blocks.sqlite "delete from Blocks where hash in (select bi.hash from BlockInfo bi order by depth desc limit 20);delete from BlockInfo where depth in (select depth from BlockInfo order by depth desc limit 20);update Tags set hash=(select hash from BlockInfo order by depth desc limit 1) where name='HEAD';"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment