Skip to content

Commit 405740f

Browse files
committed
chore: revert inconsequential change to test code
1 parent bbc3b1b commit 405740f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/vm/contracts.libevm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (t CallType) OpCode() OpCode {
9292
// regular types.
9393
func (args *evmCallArgs) run(p PrecompiledContract, input []byte, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) {
9494
if p, ok := p.(statefulPrecompile); ok {
95-
// `suppliedGas` is already held by the args.
95+
// `suppliedGas` is already held by the args, and captured by `env()`.
9696
return p.run(args.env(), input)
9797
}
9898
// Gas consumption for regular precompiles was already handled by the native

core/vm/contracts.libevm_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ func TestNewStatefulPrecompile(t *testing.T) {
149149

150150
run := func(env vm.PrecompileEnvironment, input []byte, suppliedGas uint64) ([]byte, uint64, error) {
151151
if got, want := env.StateDB() != nil, !env.ReadOnly(); got != want {
152-
return nil, suppliedGas, fmt.Errorf("PrecompileEnvironment().StateDB() must be non-nil i.f.f. not read-only; got non-nil? %t; want %t", got, want)
152+
return nil, 0, fmt.Errorf("PrecompileEnvironment().StateDB() must be non-nil i.f.f. not read-only; got non-nil? %t; want %t", got, want)
153153
}
154154
hdr, err := env.BlockHeader()
155155
if err != nil {
156-
return nil, suppliedGas, err
156+
return nil, 0, err
157157
}
158158

159159
out := &statefulPrecompileOutput{

0 commit comments

Comments
 (0)