Skip to content
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

Merged
merged 5 commits into from
Apr 3, 2018
Merged

Conversation

mappum
Copy link
Contributor

@mappum mappum commented Mar 31, 2018

Thank you a lot for contributing to Cosmos Voyager!

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!

@codecov
Copy link

codecov bot commented Mar 31, 2018

Codecov Report

Merging #587 into develop will increase coverage by 0.08%.
The diff coverage is 100%.

@@             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
Impacted Files Coverage Δ
...p/src/renderer/components/common/NiDataLoading.vue 100% <ø> (ø) ⬆️
app/src/renderer/vuex/modules/blockchain.js 97.82% <100%> (+0.45%) ⬆️
app/src/renderer/components/monitor/PageBlocks.vue 100% <100%> (ø) ⬆️

Copy link
Collaborator

@faboweb faboweb left a 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: {
Copy link
Collaborator

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)
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@faboweb faboweb merged commit d32f63d into develop Apr 3, 2018
@faboweb faboweb deleted the matt/553-handle-node-sync branch April 3, 2018 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

block explorer during fast sync is unusable
3 participants