Skip to content

Commit

Permalink
zmq await
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Wilson committed Jan 24, 2024
1 parent dadb03e commit 3fac0df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/bitcoin-rpc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export class BitcoinRpcService {
sock.subscribe("rawblock");
sock.on("message", async (topic: Buffer, message: Buffer) => {
console.log("new block zmq");
this.pollMiningInfo();
await this.pollMiningInfo();
});
this.pollMiningInfo();
this.pollMiningInfo().then(() => { });
} else {
setInterval(this.pollMiningInfo.bind(this), 500);
}
Expand Down

0 comments on commit 3fac0df

Please sign in to comment.