diff --git a/src/chains/ethereum/utils/src/things/runtime-block.ts b/src/chains/ethereum/utils/src/things/runtime-block.ts index 8d95b2c2a4..de8eee9b51 100644 --- a/src/chains/ethereum/utils/src/things/runtime-block.ts +++ b/src/chains/ethereum/utils/src/things/runtime-block.ts @@ -82,11 +82,15 @@ export class Block { const deserialized = (rlpDecode(serialized) as any) as [ Buffer[], Buffer[][], + Buffer[], Buffer ]; this._raw = deserialized[0]; this._rawTransactions = deserialized[1]; - const totalDifficulty = deserialized[2]; + // TODO: support actual uncle data (needed for forking!) + // Issue: https://github.com/trufflesuite/ganache-core/issues/786 + // const uncles = deserialized[1]; + const totalDifficulty = deserialized[3]; this.header = makeHeader(this._raw, totalDifficulty); this._size = getBlockSize(serialized, totalDifficulty); } @@ -226,9 +230,12 @@ export class RuntimeBlock { Buffer.allocUnsafe(32).fill(0), // mixHash Buffer.allocUnsafe(8).fill(0) // nonce ]; + // TODO: support actual uncle data (needed for forking!) + // Issue: https://github.com/trufflesuite/ganache-core/issues/786 + const uncles = []; const { totalDifficulty } = header; const rawTransactions = transactions.map(tx => tx.raw); - const raw = [rawHeader, rawTransactions, totalDifficulty]; + const raw = [rawHeader, rawTransactions, uncles, totalDifficulty]; const serialized = rlpEncode(raw);