planetarium / libplanet

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

Unexpected exception occurred during `NewHeight()` #3312

Closed limebell closed 1 year ago

limebell commented 1 year ago

  System.Collections.Generic.KeyNotFoundException: The given key '-1' was not present in the dictionary.
     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
     at Libplanet.Net.Consensus.HeightVoteSet.GetVoteSet(Int32 round, VoteFlag voteFlag) in /app/Lib9c/.Libplanet/Libplanet.Net/Consensus/HeightVoteSet.cs:line 222
     at Libplanet.Net.Consensus.HeightVoteSet.PreCommits(Int32 round) in /app/Lib9c/.Libplanet/Libplanet.Net/Consensus/HeightVoteSet.cs:line 178
     at Libplanet.Net.Consensus.Context.GetBlockCommit() in /app/Lib9c/.Libplanet/Libplanet.Net/Consensus/Context.cs:line 245
     at Libplanet.Net.Consensus.ConsensusContext.NewHeight(Int64 height) in /app/Lib9c/.Libplanet/Libplanet.Net/Consensus/ConsensusContext.cs:line 210
     at Libplanet.Net.Consensus.ConsensusContext.<>c__DisplayClass25_0.<<OnTipChanged>b__0>d.MoveNext() in /app/Lib9c/.Libplanet/Libplanet.Net/Consensus/ConsensusContext.cs:line 317```
OnedgeLee commented 1 year ago

Already fixed with PR #3276, closing. This bug was observed on 2.4.1, and won't be happen after 2.5.0