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