Skip to content

Commit

Permalink
update ssz field to receiptstrie
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Sep 25, 2024
1 parent 17f643c commit bd80059
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/block/src/header/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ export class BlockHeader {
coinbase: this.coinbase.bytes,
stateRoot: this.stateRoot,
transactionsTrie: this.transactionsTrie,
receiptTrie: this.receiptTrie,
receiptsTrie: this.receiptTrie,
number: this.number,
gasLimits: {
regular: this.gasLimit,
Expand All @@ -669,7 +669,8 @@ export class BlockHeader {

calcHash(): Uint8Array {
if (this.common.isActivatedEIP(6493)) {
return ssz.BlockHeader.hashTreeRoot(this.sszRaw())
const hash = ssz.BlockHeader.hashTreeRoot(this.sszRaw())
return hash;
} else {
return this.keccakFunction(RLP.encode(this.raw()))
}
Expand Down
2 changes: 1 addition & 1 deletion packages/util/src/ssz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export const BlockHeader = new StableContainerType(
coinbase: new OptionalType(Bytes20),
stateRoot: new OptionalType(Bytes32),
transactionsTrie: new OptionalType(Bytes32),
receiptTrie: new OptionalType(Bytes32),
receiptsTrie: new OptionalType(Bytes32),
number: new OptionalType(Uint64),
gasLimits: new OptionalType(FeesPerGas),
gasUsed: new OptionalType(FeesPerGas),
Expand Down

0 comments on commit bd80059

Please sign in to comment.