How can I list my mined coins using RPC? And spend them?

0

I've mined a few blocks on a blockchain, and I'm trying to figure how to actually see them. What is the correct RPC command ? I've managed to see all the coinbase transactions thanks to listtransactions, and my getbalance output seems ok, but they don't show up in listreceivedbyaddress nor listreceivedbyaccount.

rmac

Posted 2015-03-31T16:28:59.513

Reputation: 21

1These are two different questions. Please edit your question to include only the first and place the second part to a new question.George Kimionis 2015-03-31T22:11:20.750

@GeorgeKimionis Here it is

rmac 2015-04-01T06:38:19.563

@rmac to clarify, are you talking about Bitcoin -regtest or a Bitcoin-fork?Wizard Of Ozzie 2015-04-01T10:08:18.460

Answers

1

You can use the listsinceblock command to filter out the mined coins. listsinceblock contains a category field. The values you're looking for are:

  • generate: for coins mined locally that are available for spending
  • immature: same as above but coins cannot be spent yet

George Kimionis

Posted 2015-03-31T16:28:59.513

Reputation: 2 824

It seems to work, but why aren't two clients returning the same list? Since they both have access to the same list of transaction, I would have thought that the output should be the same (and that there was no way to know, from this command only, that it was possible to redeem a generate block)rmac 2015-04-01T06:49:58.423

@rmac what do you mean by "two clients"? Two different bitcoin-core instances? If so, each instance has its own wallet and so the results will be different.George Kimionis 2015-04-01T10:44:21.570

@GeorgeKimionis Judging from the tags and the quote "on a blockchain I'm inclined to think this is a Bitcoin fork project stuck at the pre-mine phase. I've tried to clarify this, rmac, which is it mate? Bitcoin or a fork?Wizard Of Ozzie 2015-04-03T01:43:36.797

@WizardOfOzzie good pointGeorge Kimionis 2015-04-03T10:09:54.160