mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
getBlockTemplate fix
This commit is contained in:
@@ -98,14 +98,13 @@ export class BitcoinRpcService implements OnModuleInit {
|
|||||||
const block = await this.rpcBlockService.getBlock(blockHeight);
|
const block = await this.rpcBlockService.getBlock(blockHeight);
|
||||||
const completeBlock = block?.data != null;
|
const completeBlock = block?.data != null;
|
||||||
|
|
||||||
|
if(process.env.MASTER == 'true'){
|
||||||
|
result = await this.loadBlockTemplate(blockHeight);
|
||||||
|
}
|
||||||
|
|
||||||
if (completeBlock) {
|
if (completeBlock) {
|
||||||
return Promise.resolve(JSON.parse(block.data));
|
return Promise.resolve(JSON.parse(block.data));
|
||||||
}
|
} else{
|
||||||
|
|
||||||
if(process.env.MASTER == 'true'){
|
|
||||||
result = await this.loadBlockTemplate(blockHeight);
|
|
||||||
}else{
|
|
||||||
result = await this.waitForBlock(blockHeight);
|
result = await this.waitForBlock(blockHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user