Skip to content
Snippets Groups Projects
Commit dea2bf46 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] add `dump table issuers` to show issuers in current bindex

parent 3d026493
No related branches found
No related tags found
No related merge requests found
...@@ -150,7 +150,15 @@ async function dumpTable(server: Server, name: string, condition?: string) { ...@@ -150,7 +150,15 @@ async function dumpTable(server: Server, name: string, condition?: string) {
switch (name) { switch (name) {
case 'b_index': case 'b_index':
rows = await server.dal.bindexDAL.findRawWithOrder(criterion, [['number', false]]) rows = await server.dal.bindexDAL.findRawWithOrder(criterion, [['number', false]])
dump(rows, ['version','bsize','hash','issuer','time','number','membersCount','issuersCount','issuersFrame','issuersFrameVar','issuerDiff','avgBlockSize','medianTime','dividend','mass','unitBase','powMin','udTime','udReevalTime','diffNumber','speed','massReeval']) break
/**
* Dumps issuers visible in current bindex
*/
case 'issuers':
rows = await server.dal.bindexDAL.findRawWithOrder(criterion, [['number', false]])
const identites = await Promise.all(Underscore.uniq(rows.map(b => b.issuer)).map(i => server.dal.iindexDAL.getFullFromPubkey(i)))
console.log(identites.map(i => i.uid))
break break
case 'i_index': case 'i_index':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment