I am just learning the language, but why did you have "&mut self" as a parameter in the calculate_hash function? You're not mutating self in that function, so I suppose it's better to just use "&self" right?
You're totally right !! If you're not mutating the self inside the calculate_hash function, you should use &self instead of &mut self. Using &mut self indicates that the function intends to mutate the state of the instance, but if no mutation happens, &self is sufficient and more appropriate, I probably forgot to remove it, or i was testing something in original code and forgot it :) Nice catch !
deriving a hash implementation for a block is challenging because hashing requires unique, consistent algorithms to ensure security and immutability, which can't be simply inferred or derived automatically.
Awesome tutorial Bro! Which VSCode extentions are you using during this lesson?
Frankly I don't remember 😂
Thank you so much 💪Amazing 🎉
You're welcome, my friend
I am just learning the language, but why did you have "&mut self" as a parameter in the calculate_hash function? You're not mutating self in that function, so I suppose it's better to just use "&self" right?
You're totally right !! If you're not mutating the self inside the calculate_hash function, you should use &self instead of &mut self. Using &mut self indicates that the function intends to mutate the state of the instance, but if no mutation happens, &self is sufficient and more appropriate, I probably forgot to remove it, or i was testing something in original code and forgot it :) Nice catch !
why can't we derive hash implementation for block?
deriving a hash implementation for a block is challenging because hashing requires unique, consistent algorithms to ensure security and immutability, which can't be simply inferred or derived automatically.
Ooops gotta go back and learn some more bout blockchain
That's a wise thing to say
Github repo?