Mise à jour effectuée, merci de nous signaler tout dysfonctionnement ! | Upgrade done, please let us know about any dysfunction!

Commit 65f0c975 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Add `dump wot` command

parent 672b9ad3
......@@ -22,6 +22,7 @@ import {dumpWotWizard} from "./dump/wotwizard/wotwizard.dump"
import {OtherConstants} from "../lib/other_constants"
import {Querable, querablep} from "../lib/common-libs/querable"
import {dumpBlocks, dumpForks} from "./dump/blocks/dump.blocks"
import {newResolveTimeoutPromise} from "../lib/common-libs/timeout-promise"
const Table = require('cli-table')
......@@ -88,6 +89,10 @@ module.exports = {
await dumpTable(server, name, cond)
break
case 'wot':
await dumpWot(server)
break
case 'history':
await dumpHistory(server, name)
break
......@@ -256,6 +261,12 @@ async function dumpHistory(server: Server, pub: string) {
}
}
async function dumpWot(server: Server) {
const data = server.dal.wotb.dumpWoT()
console.log(data)
await newResolveTimeoutPromise(1000, null)
}
async function getDateFor(server: Server, blockstamp: string) {
const b = (await server.dal.getAbsoluteBlockByBlockstamp(blockstamp)) as DBBlock
const s = " " + b.number
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment