Skip to content

Commit

Permalink
default limit hash to 0xFF..FF if not present in the snap range message.
Browse files Browse the repository at this point in the history
Signed-off-by: garyschulte <garyschulte@gmail.com>
  • Loading branch information
garyschulte committed Mar 21, 2024
1 parent b269020 commit f571c45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public class Hash extends DelegatingBytes32 {
/** The constant ZERO. */
public static final Hash ZERO = new Hash(Bytes32.ZERO);

/** Last hash */
public static final Hash LAST = new Hash(Bytes32.fromHexString("F".repeat(64)));

/**
* Hash of an RLP encoded trie hash with no content, or
* "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public StorageRange range(final boolean withRequestId) {
}
if (input.nextIsNull()) {
input.skipNext();
range.endKeyHash(Hash.ZERO);
range.endKeyHash(Hash.LAST);
} else {
range.endKeyHash(Hash.wrap(Bytes32.wrap(input.readBytes32())));
}
Expand Down

0 comments on commit f571c45

Please sign in to comment.