-
Notifications
You must be signed in to change notification settings - Fork 100
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
Handle Node Sync in Block Explorer #587
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #587 +/- ##
===========================================
+ Coverage 84.84% 84.92% +0.08%
===========================================
Files 88 88
Lines 1471 1479 +8
Branches 67 67
===========================================
+ Hits 1248 1256 +8
Misses 211 211
Partials 12 12
|
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.
Should there be a snapshot test for the case that there is a message provided to NiDataLoading?
div(slot="subtitle") Please wait a moment. | ||
</template> | ||
|
||
<script> | ||
import DataMsg from 'common/NiDataMsg' | ||
export default { | ||
name: 'ni-data-loading', | ||
components: { DataMsg } | ||
components: { DataMsg }, | ||
props: { |
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.
good idea
state.subscription = false | ||
commit('notifyError', { title: `Error subscribing to new blocks`, body: err.message }) | ||
setTimeout(() => dispatch('subscribeToBlocks'), 30e3) |
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.
30e3? never seen that before. can't find anything on google about it.
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.
Scientific notation for 30000, maybe I should do 30 * 1000
so it's more obvious.
This changes the block subscription to first check if the node is still syncing, and if so it waits another 30 seconds before trying again. If the node is syncing, a "Node is syncing blockchain..." dialog is shown in the explorer.
Issue
closes: #553
Screenshots
❤️ Thank you!