Skip to content

Commit 6304c7b

Browse files
committed
cmd/evm: fix t8ntool receipt root hash
1 parent 94b9633 commit 6304c7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/evm/internal/t8ntool/execution.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
168168
root = statedb.IntermediateRoot(chainConfig.IsEIP158(vmContext.BlockNumber)).Bytes()
169169
}
170170

171-
receipt := types.NewReceipt(root, msgResult.Failed(), gasUsed)
171+
receipt = types.NewEIP2718Receipt(tx.Type(), root, msgResult.Failed(), gasUsed)
172172
receipt.TxHash = tx.Hash()
173173
receipt.GasUsed = msgResult.UsedGas
174174
// if the transaction created a contract, store the creation address in the receipt.
@@ -180,7 +180,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
180180
receipt.Bloom = types.CreateBloom(types.Receipts{receipt})
181181
// These three are non-consensus fields
182182
//receipt.BlockHash
183-
//receipt.BlockNumber =
183+
//receipt.BlockNumber
184184
receipt.TransactionIndex = uint(txIndex)
185185
receipts = append(receipts, receipt)
186186
}

0 commit comments

Comments
 (0)