Bitcoin Forum
April 23, 2018, 12:44:36 PM *
News: Latest stable version of Bitcoin Core: 0.16.0  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: destination address of a mined block  (Read 2894 times)
collapse
Full Member
***
Offline Offline

Activity: 177
Merit: 102


step forward


View Profile
October 12, 2013, 06:57:38 PM
 #1

How to obtain destination address of a mined block?

Similar to out address:
Code:
        const CTxOut& txout = tx.vout[0];
        txnouttype type;
        vector<CTxDestination> addresses;
        int nRequired;

        if (ExtractDestinations(txout.scriptPubKey, type, addresses, nRequired)){
            BOOST_FOREACH(const CTxDestination& addr, addresses){
            printf("out_address:%s\n",CBitcoinAddress(addr).ToString().c_str());
         }

Elacoin:FairElasticMining,Betacoin:TxComment,NTRN:CryptoCourses,BitcoinP2PCash,CashBitcoinP2P,DOGE:WowSuchCurrency,SHND:x2Test,...,Americancoin,CRC,Bitcoin,...(+)

[if (blocknumber > 115000) maxblocksize=largerlimit]   [I don't think the threshold should ever be 0.  We should always allow at least some free transactions.]
1524487476
Hero Member
*
Offline Offline

Posts: 1524487476

View Profile Personal Message (Offline)

Ignore
1524487476
Reply with quote  #2

1524487476
Report to moderator
1524487476
Hero Member
*
Offline Offline

Posts: 1524487476

View Profile Personal Message (Offline)

Ignore
1524487476
Reply with quote  #2

1524487476
Report to moderator
1524487476
Hero Member
*
Offline Offline

Posts: 1524487476

View Profile Personal Message (Offline)

Ignore
1524487476
Reply with quote  #2

1524487476
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1524487476
Hero Member
*
Offline Offline

Posts: 1524487476

View Profile Personal Message (Offline)

Ignore
1524487476
Reply with quote  #2

1524487476
Report to moderator
1524487476
Hero Member
*
Offline Offline

Posts: 1524487476

View Profile Personal Message (Offline)

Ignore
1524487476
Reply with quote  #2

1524487476
Report to moderator
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1000


View Profile
October 15, 2013, 04:05:21 PM
 #2

Coinbase outputs, as implemented by the reference client, are not one of the standard address formats.

What is your question, exactly?

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
collapse
Full Member
***
Offline Offline

Activity: 177
Merit: 102


step forward


View Profile
October 15, 2013, 06:06:00 PM
 #3

In bitcoin-qt, seems that each mined block goes to new bitcoin address, first transaction output (mined block).
I was searching for "default address" for mined blocks, but do not seems possible. Createnewblock should be modified for this.



Elacoin:FairElasticMining,Betacoin:TxComment,NTRN:CryptoCourses,BitcoinP2PCash,CashBitcoinP2P,DOGE:WowSuchCurrency,SHND:x2Test,...,Americancoin,CRC,Bitcoin,...(+)

[if (blocknumber > 115000) maxblocksize=largerlimit]   [I don't think the threshold should ever be 0.  We should always allow at least some free transactions.]
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1000


View Profile
October 15, 2013, 07:19:35 PM
 #4

It uses a public key from your reserved key pool, in a public-key script (NOT a pubkey-hash script -- there is no address which specifies this script type used in coinbase transactions). You can use 'getblocktemplate' to construct your own coinbase, with whatever script you desire.

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
wiggi
Sr. Member
****
Offline Offline

Activity: 374
Merit: 250


View Profile
October 16, 2013, 03:27:51 PM
 #5

How to obtain destination address of a mined block?

If the block is already mined, you could re-use code from 'getblock' and 'getrawtransaction'.
(shows address of a mined block in plain text if verbose==1,
block reward is usually (not sure if always) the 1st tx in the list from 'getblock')

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!