save block

This commit is contained in:
Benjamin Wilson
2024-09-16 19:48:46 -04:00
parent 76d92d84b4
commit 8fdf1e839e
2 changed files with 2 additions and 8 deletions
+1 -7
View File
@@ -135,13 +135,7 @@ export class BitcoinRpcService implements OnModuleInit {
try{
console.log(`Saving block ${blockHeight}`);
const result = await this.rpcBlockService.saveBlock(blockHeight, JSON.stringify(blockTemplate));
if(result.affected < 1){
console.error('Block was not saved');
console.error(result.raw);
}else {
console.log('block saved');
}
console.log('block saved');
}catch(e){
console.error('Error saving block', e);
}