submit found block

This commit is contained in:
Ben Wilson
2023-06-18 10:08:30 -04:00
parent 916d5f20e6
commit 2803118f5c
3 changed files with 35 additions and 6 deletions
+9 -3
View File
@@ -65,9 +65,15 @@ export class BitcoinRpcService {
}
public async SUBMIT_BLOCK(hexdata: string) {
await this.client.submitblock({
hexdata
});
try {
const res = await this.client.submitblock({
hexdata
});
console.log(`BLOCK SUBMISSION RESPONSE: ${res}`);
} catch (e) {
console.log(`BLOCK SUBMISSION RESPONSE ERROR: ${e}`);
}
}
}