Skip to content

Commit 7bb57aa

Browse files
committed
packages: integrate suggestions.
1 parent b1a5c91 commit 7bb57aa

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/blockchain/src/blockchain.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
BIGINT_1,
77
BIGINT_8,
88
KECCAK256_RLP,
9-
KECCAK256_RLP_RH,
9+
SHA256_EMPTY_RH,
1010
Lock,
1111
MapDB,
1212
bigIntToHex,
@@ -1314,7 +1314,7 @@ export class Blockchain implements BlockchainInterface {
13141314
number: 0,
13151315
stateRoot,
13161316
withdrawalsRoot: common.isActivatedEIP(4895) ? KECCAK256_RLP : undefined,
1317-
requestsHash: common.isActivatedEIP(7685) ? KECCAK256_RLP_RH : undefined,
1317+
requestsHash: common.isActivatedEIP(7685) ? SHA256_EMPTY_RH : undefined,
13181318
}
13191319
if (common.consensusType() === 'poa') {
13201320
if (common.genesis().extraData) {

packages/util/src/constants.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { secp256k1 } from 'ethereum-cryptography/secp256k1.js'
2+
import { sha256 } from 'ethereum-cryptography/sha256'
23

34
import { hexToBytes } from './bytes.js'
45

@@ -67,13 +68,7 @@ export const KECCAK256_RLP = hexToBytes(KECCAK256_RLP_S)
6768
/**
6869
* Keccak-256 hash of the RLP of an empty requests hash
6970
*/
70-
export const KECCAK256_RLP_RH_S =
71-
export const SHA256_EMPTY_RH_S = sha256(new Uint8Array([0, 1, 2]))
72-
73-
/**
74-
* Keccak-256 hash of the RLP of an empty requests hash
75-
*/
76-
export const SHA256_EMPTY_RH = hexToBytes(SHA256_EMPTY_RH_S)
71+
export const SHA256_EMPTY_RH = sha256(new Uint8Array([0, 1, 2]))
7772

7873
/**
7974
* RLP encoded empty string

0 commit comments

Comments
 (0)