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

[fix] #1145 Hot keyring changing is not taken into account for the proof

parent 0754fdfd
Branches
Tags
No related merge requests found
import {Constants} from "./constants"
import {ConfDTO, Keypair} from "../../../lib/dto/ConfDTO"
import {Server} from "../../../../server"
import {PowEngine} from "./engine"
import {DBBlock} from "../../../lib/db/DBBlock"
import {CommonConstants} from "../../../lib/common-libs/constants"
import {BlockDTO} from "../../../lib/dto/BlockDTO"
import {ConfDTO, Keypair} from "../../../lib/dto/ConfDTO"
const os = require('os')
const querablep = require('querablep')
......@@ -94,15 +94,11 @@ export class WorkerFarm {
export class BlockProver {
conf:ConfDTO
pair:Keypair|null
logger:any
waitResolve:any
workerFarmPromise:any
constructor(private server:Server) {
this.conf = server.conf
this.pair = this.conf.pair
this.logger = server.logger
const debug = process.execArgv.toString().indexOf('--debug') !== -1;
......@@ -112,6 +108,14 @@ export class BlockProver {
}
}
get conf():ConfDTO {
return this.server.conf
}
get pair(): Keypair|null {
return this.conf.pair
}
getWorker(): Promise<WorkerFarm> {
if (!this.workerFarmPromise) {
this.workerFarmPromise = (async () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment