Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix: ensure clique-signer for PoA networks (#4465)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch authored Jul 5, 2023
1 parent a40a813 commit 87cdedc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/chains/ethereum/block/src/runtime-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export class RuntimeBlock {
prevRandao: Buffer;
baseFeePerGas?: bigint; // added in london
withdrawalsRoot?: Buffer; // added in shanghai
cliqueSigner: () => Address;
};

constructor(
Expand All @@ -113,10 +114,9 @@ export class RuntimeBlock {
withdrawalsRoot?: Buffer
) {
this._common = common;
const coinbaseBuffer = coinbase.toBuffer();
this.header = {
parentHash: parentHash.toBuffer(),
coinbase: new Address(coinbaseBuffer),
coinbase: coinbase,
number: number.toBigInt(),
difficulty: difficulty.toBigInt(),
totalDifficulty: Quantity.toBuffer(
Expand All @@ -128,7 +128,9 @@ export class RuntimeBlock {
baseFeePerGas,
mixHash,
prevRandao: mixHash,
withdrawalsRoot
withdrawalsRoot,
// fixes https://github.com/trufflesuite/ganache/issues/4359
cliqueSigner: () => coinbase
};
}

Expand Down

0 comments on commit 87cdedc

Please sign in to comment.