-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate: bump up the spvchain database version in filter indexer migration #1097
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1097 +/- ##
==========================================
- Coverage 69.35% 69.35% -0.01%
==========================================
Files 158 158
Lines 26586 26586
==========================================
- Hits 18439 18438 -1
- Misses 8147 8148 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
await updateChainVersion(chainDB, 7); | ||
// update spvChainDB if it exists | ||
const spvchain = path.resolve(process.argv[2], '../spvchain'); | ||
if (await fs.exists(spvchain)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to add the same check for full node chain
directory as well. If you have only ever used bcoin in spv mode, there will not be a ~/.bcoin/chain
directory and the script will fail.
At the same time, the migrate/latest
script also needs to be more clever, because if index
doesn't exist we STILL need to run that script in order to bump the chain
and/or spvchain
databases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
a50785c
to
5bb3213
Compare
still needs this fix I think:
|
…ation Signed-off-by: theanmolsharma <anmolsharma0234@gmail.com>
5bb3213
to
1f296d6
Compare
Ok I think this is done, thanks! Tested this morning with a ton of configurations against a regtest blockchain with thousands of blocks and tens of thousands of transactions.
Each instance was synced on bcoin v2.0.0 and then duplicated (ten total tests). Tested by migrating with |
Closes #1095