I have the following problem:
currently i am testing in my local regtest
I generated the following cb-tx for block at height 119: 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff03027700ffffffff0158bf122a010000001976a914a08da9e35ab58e957204703da9d48967ddd1703b88ac00000000
there are some tx in the mempool for the other tx i take the txid from the getblocktemplate request
I reverse the byte order for all of those and for the txid of the cbtx aswell.
still, i get the following error: bad-txnmrklroot
when i generate a block using generatetoaddress in regtest, then use getblock and run my merkle function over the txids, the merkle root is correct which means it is a issue with the coinbase txid
i realized that the coinbase tx from the generatetoaddress rpc call has a second output with 0 satoshis. is it possible to remove this second output so i can test further?
maybe someone had the same issue.
thanks in advance.