koodilehto / kryptoradio

Bitcoin serialization and broadcasting tool (and more!)
http://kryptoradio.koodilehto.fi/
GNU Affero General Public License v3.0
95 stars 9 forks source link

Remove transaction count from packed block #8

Closed zouppen closed 10 years ago

zouppen commented 10 years ago

Blocks containing fixed-width hashes instead of full transactions may safely be packed right after header without length indicator because the count can be inferred from message length:

tx_count = (block_length - block_header_size) / SHA256_DIGEST_LENGTH