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

fix: ensure clique-signer for PoA networks #4465

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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