This commit is contained in:
Benjamin Wilson
2024-09-16 19:39:56 -04:00
parent 88e7f5f3fb
commit 4928f34daf
4 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -134,7 +134,12 @@ export class BitcoinRpcService implements OnModuleInit {
try{
console.log(`Saving block ${blockHeight}`);
await this.rpcBlockService.saveBlock(blockHeight, JSON.stringify(blockTemplate));
const result = await this.rpcBlockService.saveBlock(blockHeight, JSON.stringify(blockTemplate));
if(result.affected < 1){
console.error('Block was not saved');
}else {
console.log('block saved');
}
}catch(e){
console.error('Error saving block', e);