Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
timothe
duniter
Commits
65f0c975
Commit
65f0c975
authored
Apr 28, 2019
by
Cédric Moreau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[enh] Add `dump wot` command
parent
672b9ad3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
app/modules/dump.ts
app/modules/dump.ts
+11
-0
No files found.
app/modules/dump.ts
View file @
65f0c975
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment