OrderStatisticsTree icon indicating copy to clipboard operation
OrderStatisticsTree copied to clipboard

out of range when more than one key per value

Open okwme opened this issue 1 year ago • 0 comments

After entering the following kv pairs I was getting out of range panics when using rank or atRank:

{
  "0x000000000000000000000000c795344b1b30e3cfee1afa1d5204b141940cf445": 200,
  "0x00000000000000000000000021c8d946027dcada77f4dc90802ea9b906d3cce4": 268,
  "0x00000000000000000000000047e65bc714cd44959360ac0814a5fca0f5b07145": 268,
  "0x00000000000000000000000030ce3ced12f1facf02fe0da8578f809f5e4937e4": 400
}

Value 268 exists twice but while looping through the smaller became negative.

Maybe this didn't panic in older versions of solidity?

okwme avatar Oct 17 '24 05:10 okwme