Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SUBMIT
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SUBMIT
Crypto Flexs
Home»BITCOIN NEWS»bitcoin core – How do miners generate multiple outputs on a coinbase transaction?
BITCOIN NEWS

bitcoin core – How do miners generate multiple outputs on a coinbase transaction?

By Crypto FlexsSeptember 9, 20241 Min Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
bitcoin core – How do miners generate multiple outputs on a coinbase transaction?
Share
Facebook Twitter LinkedIn Pinterest Email

Bitcoin Core hardcodes the Coinbase transaction as a single output. coinbaseTx.vout.resize(1) By definition src/node/miner.cpp

     // Create coinbase transaction.
    CMutableTransaction coinbaseTx;
    coinbaseTx.vin.resize(1);
    coinbaseTx.vin(0).prevout.SetNull();

****************************************************
//Referring to the line of code below 
    coinbaseTx.vout.resize(1);

*****************************************************
    coinbaseTx.vout(0).scriptPubKey = scriptPubKeyIn;
    coinbaseTx.vout(0).nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
    coinbaseTx.vin(0).scriptSig = CScript() << nHeight << OP_0;
    pblock->vtx(0) = MakeTransactionRef(std::move(coinbaseTx));
    pblocktemplate->vchCoinbaseCommitment = m_chainstate.m_chainman.GenerateCoinbaseCommitment(*pblock, pindexPrev);
    pblocktemplate->vTxFees(0) = -nFees;

    LogPrintf("CreateNewBlock(): block weight: %u txs: %u fees: %ld sigops %d\n", GetBlockWeight(*pblock), nBlockTx, nFees, nBlockSigOpsCost);

However, in the recent block 860062, the mining pool paid several remote miners directly in a coin-based transaction: https://mempool.space/tx/aff7c9b18666c0a51c66013642e24bfcb8b721a674e0f4ce3afa3004b55b0156

How does a miner create a coinbase transaction that overrides the defaults specified in the above Bitcoin Core code snippet?

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

A Year of Colocation with Beeks: Open Access to Low-Latency Transactions

May 1, 2026

What the KelpDAO Exploit Reveals About Hidden Risks in DeFi

April 25, 2026

taproot – Is the OP_SUCCESSx reservation in BIP-342 designed with a specific opcode family in mind, or as a general forward compatibility mechanism?

April 19, 2026
Add A Comment

Comments are closed.

Recent Posts

As smart money accumulates, Bitcoin stalls below the resistance line.

May 2, 2026

Minnesota bans AI apps that create fake nude images

May 2, 2026

A Year of Colocation with Beeks: Open Access to Low-Latency Transactions

May 1, 2026

Guardian Rewards – Vault12

May 1, 2026

Race 2.0, Leios and Voltaire Live Voting

May 1, 2026

SHRMiner Lights Up London’s Piccadilly Circus, Propelling AI Cloud Mining Into The Mainstream Spotlight

May 1, 2026

Rayls Launches Public Mainnet, Advancing Its Mission To Bring Global Finance Onchain

May 1, 2026

XRP to $10,000? Ripple CTO emeritus rejects bold claims.

May 1, 2026

How AI Is Transforming The Cryptocurrency Ecosystem

May 1, 2026

BitMart x $EAT Trade-to-Feed Competition Pays 4.4 Million USDT to Traders in May 2026

April 30, 2026

Crypto billionaire Justin Sun files suit against Trump-linked World Liberty Financial over ‘wrongly’ frozen tokens

April 30, 2026

Crypto Flexs is a Professional Cryptocurrency News Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of Cryptocurrency. We hope you enjoy our Cryptocurrency News as much as we enjoy offering them to you.

Contact Us : Partner(@)Cryptoflexs.com

Top Insights

As smart money accumulates, Bitcoin stalls below the resistance line.

May 2, 2026

Minnesota bans AI apps that create fake nude images

May 2, 2026

A Year of Colocation with Beeks: Open Access to Low-Latency Transactions

May 1, 2026
Most Popular

Bitcoin price fell below $58,000 ahead of the FOMC, down 22% from its all-time high.

May 1, 2024

While the WEN token airdrop is nearing completion, Solana sign-ups are at an all-time high.

January 29, 2024

What is Cache Blockchain?

February 4, 2024
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2026 Crypto Flexs

Type above and press Enter to search. Press Esc to cancel.