File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,18 @@ Each request type will defines its own `requests` object using with its own
4848Extend the header with a new 32 byte commitment value ` requests_hash ` .
4949
5050A requests hash list is computed by hashing the elements of the block requests list, but
51- only ones where ` request_data ` is non-empty. The commitment is then computed as the sha256
52- hash of the list of requests element hashes.
51+ only ones where ` request_data ` is non-empty. Note we assume ` request_type ` has a size of
52+ one byte.
53+
54+ The commitment is then computed as the sha256 hash of the list of element hashes.
5355
5456
5557``` python
5658def compute_requests_hash (block_requests ):
5759 m = sha256()
5860 for r in block_requests:
5961 if len (r) > 1 :
60- m.update(sha256(r))
62+ m.update(sha256(r).digest() )
6163 return m.digest()
6264
6365block.header.requests_hash = compute_requests_hash(requests)
You can’t perform that action at this time.
0 commit comments