From dea2bf46c2f4a86a14fb62df83b8b3b20140acc8 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Wed, 27 Mar 2019 18:17:07 +0100 Subject: [PATCH] =?UTF-8?q?[enh]=C2=A0add=20`dump=20table=20issuers`=20to?= =?UTF-8?q?=20show=20issuers=20in=20current=20bindex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/dump.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/modules/dump.ts b/app/modules/dump.ts index 3c84aaf6d..721a65433 100644 --- a/app/modules/dump.ts +++ b/app/modules/dump.ts @@ -150,7 +150,15 @@ async function dumpTable(server: Server, name: string, condition?: string) { switch (name) { case 'b_index': 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 case 'i_index': -- GitLab