We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
subscribeNewHeads
1 parent ee7225c commit aebe56fCopy full SHA for aebe56f
docs/examples/promise/02_listen_to_blocks/index.js
@@ -16,7 +16,7 @@ async function main () {
16
// Subscribe to the new headers on-chain. The callback is fired when new headers
17
// are found, the call itself returns a promise with a subscription that can be
18
// used to unsubscribe from the newHead subscription
19
- const unsubscribe = await api.rpc.chain.subscribeNewHead((header) => {
+ const unsubscribe = await api.rpc.chain.subscribeNewHeads((header) => {
20
console.log(`Chain is at block: #${header.number}`);
21
22
if (++count === 256) {
0 commit comments