LiteSVM / litesvm

Apache License 2.0
68 stars 11 forks source link

Use indexmap instead of hashmap for transaction history #21

Closed kevinheavey closed 5 months ago

kevinheavey commented 5 months ago

Indexmap keeps track of insertion order, hashmap does not: https://stackoverflow.com/questions/30243100/how-do-i-sort-a-map-by-order-of-insertion

We can use shift_remove to remove the oldest entry