-
Notifications
You must be signed in to change notification settings - Fork 91
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
upgrade hsd to rescan fix #232
Conversation
closing for now -- working on new version of |
Ready to review! This version of |
06f2785
to
54415a7
Compare
app/ducks/walletActions.js
Outdated
try { | ||
txs = await walletClient.getTransactionHistory(); | ||
} catch (e) { | ||
// |
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.
Don't we want to do something with this error? Tx history will be empty if an error occurs here.
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.
i was trying to handle the error when wallet name is not set, which should return an empty array, but now I realize this is better handled in wallet/service
instead.
because there are many PRs stacked on this one now, I will fix this issue in my next commit.
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.
@@ -547,6 +550,7 @@ class WalletService { | |||
prefix: networkName === 'main' | |||
? HSD_DATA_DIR | |||
: path.join(HSD_DATA_DIR, networkName), | |||
migrate: 0, |
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.
Won't this prevent any future wallet migrations from going through?
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.
For more context here is the original PR and intent before the migrate
flag addition. It is for an existing migration in hsd
.
await this.refreshNodeInfo(); | ||
|
||
if (entry && txs) { | ||
await this.node.wdb.addBlock(entry, txs); |
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.
Doesn't the wallet node do this automatically?
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.
Yep - i am stubbing the handler to call refreshNodeInfo
on new block vs on an interval.
This PR builds on #231 and should be rebased against master after #231 is merged.
This upgrade
kyokan/hsd
to support:You can check out this pull request to hsd for comments/review on the
hsd
part of the code.