13.8 C
New York
Wednesday, April 17, 2024

coinbase transaction – bitcoin-cli generatetoaddress has 2 outputs


I’ve the next drawback:

presently i’m testing in my native regtest

I generated the next cb-tx for block at peak 119: 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff03027700ffffffff0158bf122a010000001976a914a08da9e35ab58e957204703da9d48967ddd1703b88ac00000000

there are some tx within the mempool
for the opposite tx i take the txid from the getblocktemplate request

I reverse the byte order for all of these and for the txid of the cbtx aswell.

nonetheless, i get the next error: bad-txnmrklroot

when i generate a block utilizing generatetoaddress in regtest, then use getblock and run my merkle operate over the txids, the merkle root is appropriate which implies it’s a situation with the coinbase txid

i noticed that the coinbase tx from the generatetoaddress rpc name has a second output with 0 satoshis.
is it attainable to take away this second output so i can take a look at additional?

perhaps somebody had the identical situation.

thanks prematurely.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles