Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blockchain: fix a bug where a duplicate entry is possible in the mapslice #2134

Commits on Mar 7, 2024

  1. blockchain: add another mapslice duplicate entry case

    Duplicate entries are currently possible in the following scenario:
    
    1: Add entries to the mapslice.
    2: 1st map is full. Move onto the 2nd map.
    3: Delete any entry in the first map.
    4: Attempt to add an entry in the 2nd map.
    
    When attempting (4), the entry should just be overwritten but a
    duplicate gets added.
    kcalvinalvin committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    8d1aa01 View commit details
    Browse the repository at this point in the history
  2. blockchain: check all the maps first before adding an entry

    When attempting to insert an entry to the mapslice, we check all the
    underlying maps to ensure that the entry doesn't exist.
    kcalvinalvin committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    059a668 View commit details
    Browse the repository at this point in the history