planetarium / libplanet

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

Remove a possible `ConsensusContext` lock due to a future `ConsensusMsg`. #3845

Closed greymistcube closed 1 week ago

greymistcube commented 1 week ago

Resolves #3833.

Changed to store ConsensusMsgs in a HashSet<T> instead of creating a new Context. Also removed a requirement for needing lastCommit from Context.Start(). As a result, a lock should no longer happen due to receiving a ConsensusMsg from other Peers.