Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
  • TRADE
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
  • TRADE
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

21.72% of encryption in the second quarter of 2025

July 11, 2025

As Nano Labs begins to accumulate $ 1 billion, BNB gets a big supporter.

July 5, 2025

Bitcoin is integrated into less than $ 108,000, but the eyes are set for $ 115,000.

June 29, 2025
Add A Comment

Comments are closed.

Recent Posts

Crypto Company is a bank license in the US during Ripple, Circle and Bito Target

July 14, 2025

HeraldEX Defines The Future With Its One-Stop Crypto Platform For Businesses

July 14, 2025

BSGM Engages CXG To Acquire FINRA/SEC-Registered Broker-Dealer To Expand Publicly Traded RWA Tokenization Operations

July 14, 2025

Tornado cash Roman storms insist on Doj Botched Key Telegram evidence.

July 14, 2025

HBAR prices overtake Bitcoin cash after a 4 -month high and 27% rise.

July 14, 2025

Algorand (Algo) Get momentum in the launch and technical growth.

July 14, 2025

Floki Eyes 120% Rally Valhalla launches $ 10K prizes after explosive weekly growth

July 13, 2025

Crypto Digital Marketing Agency to Elevate Your Project

July 13, 2025

Encryption responded to US-Vietnamese trade transactions. BTC wiped $ 110K

July 13, 2025

Rich Miner plan aims to audit a stable encryption.

July 12, 2025

Tethers in September, completing USDT support for Omni, Bitcoin Cash SLP, KUSAMA, EOS and Algorand

July 12, 2025

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

Crypto Company is a bank license in the US during Ripple, Circle and Bito Target

July 14, 2025

HeraldEX Defines The Future With Its One-Stop Crypto Platform For Businesses

July 14, 2025

BSGM Engages CXG To Acquire FINRA/SEC-Registered Broker-Dealer To Expand Publicly Traded RWA Tokenization Operations

July 14, 2025
Most Popular

Spot Bitcoin ​​ETF applicants submit an amended Form S-1 as a final step for approval.

January 8, 2024

🔴 Cryptocurrency market overreaction?! | Cryptocurrency News of the Week – October 23, 2023

November 29, 2023

BlockFi will shut down its web platform this month and users will be able to access their funds through Coinbase.

May 10, 2024
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2025 Crypto Flexs

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