get blocks from esplora for cpfp indexer

This commit is contained in:
Mononaut
2022-11-29 11:37:51 +09:00
parent f2ad184d1f
commit 6d6dd09d11
4 changed files with 7 additions and 7 deletions

View File

@@ -81,7 +81,7 @@ class BitcoinApi implements AbstractBitcoinApi {
.then((rpcBlock: IBitcoinApi.Block) => rpcBlock.tx);
}
$getRawBlock(hash: string): Promise<string> {
$getRawBlock(hash: string): Promise<Buffer> {
return this.bitcoindClient.getBlock(hash, 0)
.then((raw: string) => Buffer.from(raw, "hex"));
}