fix hash issue and 24H changes
This commit is contained in:
parent
b955949c66
commit
ecfe1f3ec4
@ -315,8 +315,8 @@ export default {
|
||||
return tab.map(x => {
|
||||
const xh = x
|
||||
if (Object.keys(this.latestPower).length > 0 && Object.keys(this.previousPower).length > 0) {
|
||||
const latest = this.latestPower[x.consensus_pubkey.value] || 0
|
||||
const previous = this.previousPower[x.consensus_pubkey.value] || 0
|
||||
const latest = this.latestPower[x.consensus_pubkey.key] || 0
|
||||
const previous = this.previousPower[x.consensus_pubkey.key] || 0
|
||||
xh.changes = latest - previous
|
||||
}
|
||||
return xh
|
||||
|
@ -59,6 +59,7 @@
|
||||
import {
|
||||
BCard, BCardTitle, BFormTextarea,
|
||||
} from 'bootstrap-vue'
|
||||
import { fromBase64, toHex } from '@cosmjs/encoding'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -113,7 +114,7 @@ snapshot-keep-recent = 2`,
|
||||
const { height } = l.block.header
|
||||
if (height > interval * 3) {
|
||||
this.$http.getBlockByHeight(Math.trunc((height - 3 * interval) / interval) * interval).then(x => {
|
||||
this.hash = x.block_id.hash
|
||||
this.hash = toHex(fromBase64(x.block_id.hash))
|
||||
this.height = x.block.header.height
|
||||
this.state = `[statesync]
|
||||
enable = true
|
||||
|
Loading…
Reference in New Issue
Block a user