Skip to content

Commit

Permalink
Fix Contains
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Feb 10, 2024
1 parent c74a04f commit b9966ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Neo/Persistence/MemorySnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void Put(byte[] key, byte[] value)

public byte[] TryGet(byte[] key)
{
if (writeBatch.TryGetValue(key, out byte[] value))
if (writeBatch.TryGetValue(key, out var value))
{
return value;
}
Expand All @@ -76,9 +76,9 @@ public byte[] TryGet(byte[] key)

public bool Contains(byte[] key)
{
if (writeBatch.TryGetValue(key, out byte[] value) && value != null)
if (writeBatch.TryGetValue(key, out var value))
{
return true;
return value != null;
}

return immutableData.ContainsKey(key);
Expand Down

0 comments on commit b9966ae

Please sign in to comment.