Update subscribeNewHeads in example (#1376)

This commit is contained in:
Shawn Tabrizi
2019-09-09 11:56:34 +02:00
committed by Jaco Greeff
parent ee7225ca0e
commit aebe56f471
@@ -16,7 +16,7 @@ async function main () {
// Subscribe to the new headers on-chain. The callback is fired when new headers
// are found, the call itself returns a promise with a subscription that can be
// used to unsubscribe from the newHead subscription
const unsubscribe = await api.rpc.chain.subscribeNewHead((header) => {
const unsubscribe = await api.rpc.chain.subscribeNewHeads((header) => {
console.log(`Chain is at block: #${header.number}`);
if (++count === 256) {