Transaction

443ee99d3839252b40fbb8498f4e5ab5f0f12fe5f1ba7d75594ff7ed6f8117e9
2024-04-02 23:39:28
0.00000021 BSV
(
0.01071751 BSV
-
0.01071730 BSV
)
10.23 sat/KB
1
69,314
2,051 B

2 Outputs

Total Output:
0.01071730 BSV
  • j"1LAnZuoQdcKCkpDBKQMCgziGMoPC4VQUckM<div class="post">They key bits of code are:<br/><div class="codeheader">Code:</div><div class="code">fileout &lt;&lt; FLATDATA(pchMessageStart) &lt;&lt; nSize;<br/>...<br/>fileout &lt;&lt; *this;</div>pchMessageStart are the four magic bytes, and those are written with FLATDATA.<br/><br/>The CBlock itself is written by &lt;&lt; *this, and that's done by the IMPLEMENT_SERIALIZE in main.h:<br/><div class="codeheader">Code:</div><div class="code">&nbsp; &nbsp; IMPLEMENT_SERIALIZE<br/>&nbsp; &nbsp; (<br/>&nbsp; &nbsp; &nbsp; &nbsp; READWRITE(this-&gt;nVersion);<br/>&nbsp; &nbsp; &nbsp; &nbsp; nVersion = this-&gt;nVersion;<br/>&nbsp; &nbsp; &nbsp; &nbsp; READWRITE(hashPrevBlock);<br/>&nbsp; &nbsp; &nbsp; &nbsp; READWRITE(hashMerkleRoot);<br/>&nbsp; &nbsp; &nbsp; &nbsp; READWRITE(nTime);<br/>&nbsp; &nbsp; &nbsp; &nbsp; READWRITE(nBits);<br/>&nbsp; &nbsp; &nbsp; &nbsp; READWRITE(nNonce);<br/><br/>&nbsp; &nbsp; &nbsp; &nbsp; // ConnectBlock depends on vtx being last so it can calculate offset&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; if (!(nType &amp; (SER_GETHASH|SER_BLOCKHEADERONLY)))<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; READWRITE(vtx);<br/>&nbsp; &nbsp; &nbsp; &nbsp; else if (fRead)<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const_cast&lt;CBlock*&gt;(this)-&gt;vtx.clear();<br/>&nbsp; &nbsp; )<br/></div><br/>The READWRITE macros Do The Right Thing, reading in or writing out the members in a machine-independent way.<br/><br/>See <a href="http://github.com/gavinandresen/bitcointools">http://github.com/gavinandresen/bitcointools</a> for simplified Python code that can dump out transactions and blocks.<br/><br/></div> text/html
    https://whatsonchain.com/tx/443ee99d3839252b40fbb8498f4e5ab5f0f12fe5f1ba7d75594ff7ed6f8117e9