mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 08:43:06 +00:00
Apply suggestions from code review
Co-authored-by: Linda Guiga <101227802+LindaGuiga@users.noreply.github.com> Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
This commit is contained in:
parent
48b9769e34
commit
f4713c44d3
@ -197,7 +197,7 @@ encode_node_branch_prepend_prefix:
|
||||
// If result_len != 32, result is raw RLP, with an appropriate RLP prefix already.
|
||||
SWAP1 DUP1 %sub_const(32) %jumpi(%%unpack)
|
||||
// Otherwise, result is a hash, and we need to add the prefix 0x80 + 32 = 160.
|
||||
// stack: result_len, result, cur_len, rlp_pos, rlp_start, node_payload_ptr, encode_value, cur_len, retdest
|
||||
// stack: result_len, result, cur_len, rlp_pos, rlp_start, node_payload_ptr, encode_value, retdest
|
||||
PUSH 160
|
||||
DUP5 // rlp_pos
|
||||
%mstore_rlp
|
||||
|
||||
@ -94,7 +94,7 @@ const MISC_CONSTANTS: [(&str, [u8; 32]); 3] = [
|
||||
hex!("0000000000000000000000000000000100000000000000000000000000000000"),
|
||||
),
|
||||
// Position in SEGMENT_RLP_RAW where the empty node encoding is stored. It is
|
||||
// equal to usize::MAX so that all rlp pointers all much smalled than that
|
||||
// equal to usize::MAX so that all rlp pointers all much smaller than that.
|
||||
(
|
||||
"ENCODED_EMPTY_NODE_POS",
|
||||
hex!("00000000000000000000000000000000000000000000000000000000FFFFFFFF"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user