Skip to content

Commit

Permalink
no fingerprint check
Browse files Browse the repository at this point in the history
  • Loading branch information
sky1045 committed Nov 3, 2023
1 parent e5b8e66 commit 0d95a80
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Libplanet/Store/Trie/MerkleTrie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,22 +290,14 @@ bool GuessValueNode(in ImmutableArray<byte> path, byte[] value)
// It assumes every length of value nodes is same with Address' hexadecimal
// string's hexadecimal string's size.
bool isValueNode = GuessValueNode(path, value);
bool noFingerprint = value.All(x => x != '*');
if (noFingerprint)
{
yield return (key, value);

// To avoid decode value node, it decodes when only there is '*' character,
// fingerprint.
}

if (isValueNode)
{
continue;
}

var node = NodeDecoder.Decode(_codec.Decode(value, LoadIndirectValue));
if (!noFingerprint && !(node is null))
if (!(node is null))
{
yield return (key, _codec.Encode(node.ToBencodex()));
}
Expand Down

0 comments on commit 0d95a80

Please sign in to comment.