Skip to content

Commit

Permalink
vm: fix pre-byzantium receipts
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-brouwer authored and gabrocheleau committed May 16, 2022
1 parent ee7831f commit 7658494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/vm/src/evm/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,6 @@ export default class EVM extends AsyncEventEmitter {
* based on the `to` address. It checkpoints the state and reverts changes
* if an exception happens during the message execution.
*/

async runCall(opts: RunCallOpts): Promise<EVMResult> {
let message = opts.message
if (!message) {
Expand Down
6 changes: 3 additions & 3 deletions packages/vm/src/runBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ export function encodeReceipt(receipt: TxReceipt, txType: number) {
RLP.encode(
bufArrToArr([
(receipt as PreByzantiumTxReceipt).stateRoot ??
(receipt as PostByzantiumTxReceipt).status === 0
? Buffer.from([])
: Buffer.from('01', 'hex'),
((receipt as PostByzantiumTxReceipt).status === 0
? Buffer.from([])
: Buffer.from('01', 'hex')),
bigIntToBuffer(receipt.gasUsed),
receipt.bitvector,
receipt.logs,
Expand Down

0 comments on commit 7658494

Please sign in to comment.