kostaleonard / theblockchainkiller

Leo's anti-The Blockchain
MIT License
4 stars 1 forks source link

block_hash should not know how to hash transactions directly #8

Open kostaleonard opened 1 year ago

kostaleonard commented 1 year ago

As a user, I want block_hash to call a helper function in transaction.c to compute the hash of a transaction so that I still get correct transaction hashes if transaction_t changes.

block_hash knows too much about transactions. It should ask transaction.c to get the hash of a transaction for it. The reason I didn't implement it like that is because I would have had to change the function signature for block_hash, and I didn't want to do it right now.