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

[fix] #1052 `gen-next` command was broken due to TS migration

parent 3080f306
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ export const ProverDependency = {
const port = params[1];
const difficulty = params[2];
const generator = new BlockGeneratorWhichProves(server, null);
return generateAndSend(program, host, port, difficulty, server, () => generator.nextBlock);
return generateAndSend(program, host, port, difficulty, server, () => () => generator.nextBlock())
}
}, {
name: 'gen-root [host] [port] [difficulty]',
......@@ -90,7 +90,7 @@ export const ProverDependency = {
let toDelete, catched = true;
do {
try {
await generateAndSend(program, host, port, difficulty, server, () => generator.nextBlock);
await generateAndSend(program, host, port, difficulty, server, () => () => generator.nextBlock())
catched = false;
} catch (e) {
toDelete = await server.dal.idtyDAL.query('SELECT * FROM idty i WHERE 5 > (SELECT count(*) from cert c where c.`to` = i.pubkey)');
......
......@@ -38,7 +38,7 @@ export class BlockGenerator {
this.logger = server.logger;
}
nextBlock(manualValues:any, simulationValues:any = {}) {
nextBlock(manualValues:any = {}, simulationValues:any = {}) {
return this.generateNextBlock(new NextBlockGenerator(this.mainContext, this.conf, this.dal, this.logger), manualValues, simulationValues)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment