I am working on an altcoin based on bitcoin-core, version 0.12.1 (this version including setgenerate). Is their an option for a miner to know (using bitcoin-cli) how many blocks mined by him (after setgenerate was set to true), had been accepted by the network and had been inserted to the blockchain?

  • You wait for a sufficient number of new blocks to be mined on top of your block and see if the chain includes your block. For bitcoin, this is 6 blocks. If you see a chain with a different block at the height you submitted, your block was dropped. – Raghav Sood Jun 19 '18 at 5:30
  • OK, but is their a way to get the number of blocks which meets that definition by a command (or a set of commands) ? somethonk like getblockcount, but counted only for a specific miner. – Yosi Karl Jun 19 '18 at 5:39
  • No, you will have to maintain an index separately. Additionally, it may not always be possible to tell is multiple blocks were mined by the same miner – Raghav Sood Jun 19 '18 at 5:47
  • Can you elaborate about how to maintain this index? thanks – Yosi Karl Jun 19 '18 at 6:39
  • @RaghavSood For bitcoin, it's 100 blocks, I believe. – MCCCS Jun 20 '18 at 6:14