0

Websites like blockchain.info and btc.com give Relayed By information to find who found the block. I can see coinbase text in the website https://coin.dance/blocks. Is it possible to get that information using bitcoin-cli ?

1 Answer 1

1

Certainly. Use bitcoin-cli getblock <hash> 2 to get the full details of a block (you may want to pipe the output to less as there will be a lot of output). The first transaction in the block (the first transaction in the array tx) is the coinbase transaction. In there, there is a field labeled coinbase. That contains the hex of the bytes of whatever data miners are putting there in the transaction. Drop the hex into whatever Hex to Ascii converter you want and you will get text. Note that some miners may not include readable text in their coinbases.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.