Commit 99f0d0b
authored
Add
## Why this should be merged
Coreth and Subnet-EVM require access to the current tx hash in the Warp
precompile (for selecting the correct predicate results).
This can not be exposed as a wrapper through the `OverrideEVMResetArgs`
because `SetTxContext` is called _prior_ to resetting the EVM instance.
Therefore, the `SetTxContext` function on any DB wrapper would never be
called.
## How this works
Exposes the existing `txHash` through a `TxHash()` function.
## How this was tested
Added a trivial unit test.*StateDB.TxHash for usage with Warp (#204)1 parent 08e2b6d commit 99f0d0b
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
39 | 51 | | |
40 | 52 | | |
41 | 53 | | |
| |||
0 commit comments