show current version for state-sync
This commit is contained in:
parent
1ef6c55403
commit
6fceb30b73
@ -55,6 +55,10 @@ export default class ChainFetch {
|
||||
return true
|
||||
}
|
||||
|
||||
async getNodeInfo() {
|
||||
return this.get('/node_info')
|
||||
}
|
||||
|
||||
async getLatestBlock(config = null) {
|
||||
const conf = config || this.getSelectedConfig()
|
||||
if (conf.chain_name === 'injective') {
|
||||
|
@ -17,7 +17,7 @@
|
||||
WIP
|
||||
</b-badge>
|
||||
</b-card-title>
|
||||
<b class="mt-1">1. Install Binary</b><br>
|
||||
<b class="mt-1">1. Install Binary ({{ version }})</b><br>
|
||||
We need to install the binary first and make sure that the version is the one currently in use on mainnet.
|
||||
<br><br>
|
||||
<b class="mt-1">2. Enable State Sync</b><br>
|
||||
@ -95,6 +95,7 @@ export default {
|
||||
? `# Comma separated list of nodes to keep persistent connections to \npersistent_peers = "${peers}" `
|
||||
: 'OMG! There is NO available providers, but you can try it.'
|
||||
return {
|
||||
version: '',
|
||||
snapshot_provider,
|
||||
servers,
|
||||
providers,
|
||||
@ -112,27 +113,6 @@ snapshot-interval = 1000
|
||||
snapshot-keep-recent = 2`,
|
||||
}
|
||||
},
|
||||
// computed: {
|
||||
// state: {
|
||||
// get() {
|
||||
// let servers = ''
|
||||
// const { rpc } = this.$store.state.chains.selected
|
||||
// if (rpc && Array.isArray(rpc)) {
|
||||
// servers = rpc.join(',')
|
||||
// }
|
||||
// return `[statesync]
|
||||
// enable = true
|
||||
// rpc_servers = "${servers}"
|
||||
// trust_height = ${this.height}
|
||||
// trust_hash = "${this.hash}"
|
||||
// trust_period = "168h" # 2/3 of unbonding time`
|
||||
// },
|
||||
// set(text) {
|
||||
// console.log(text)
|
||||
// // this.state = text
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
created() {
|
||||
const interval = 1000
|
||||
this.$http.getLatestBlock().then(l => {
|
||||
@ -150,6 +130,10 @@ trust_period = "168h" # 2/3 of unbonding time`
|
||||
this.check()
|
||||
})
|
||||
}
|
||||
this.$http.getNodeInfo().then(res => {
|
||||
console.log(res)
|
||||
this.version = res.application_version.version
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user