playground

The world is a playground.

Web3 でノードがマイニングしているかどうかを確認

  • web3.eth.isMining を使用します。
  • マイニングしていれば true を、それ以外の場合は false を返します。

サンプルコード

web3.eth.isMining()
.then(console.log);
// => true

参考