planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
507 stars 141 forks source link

Check `Transaction<T>.GenesisHash` for a genesis `Block<T>` #3078

Open greymistcube opened 1 year ago

greymistcube commented 1 year ago

If I'm not mistaken there is no check for Transaction<T>.GenesisHash for Transaction<T>s in a genesis Block<T>. Logically, since GenesisHash can't be assigned before a genesis Block<T> is produced, it'd make sense to enforce that this must be null. 🙄

greymistcube commented 1 year ago

Also there seems to be more issues regarding Transaction<T>.GenesisHash check in general. 😐 Currently, it is being checked whether GenesisHashes are the same for all Transaction<T>s when creating a BlockContent<T>. I'm not sure what the exact purpose of it is, but we might want to streamline this as well.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.