Skip to content

Commit c1a1888

Browse files
Charge extra sload (#1442)
1 parent 706bee9 commit c1a1888

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎builtin/staker_native.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ func init() {
442442
charger := gascharger.New(env)
443443

444444
staker := Staker.NativeMetered(env.State(), charger)
445+
charger.Charge(thor.SloadGas)
445446
issuance, err := Energy.Native(env.State(), env.BlockContext().Time).CalculateRewards(staker)
446447
if err != nil {
447448
return nil, err

‎builtin/staker_native_gas_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func TestStakerNativeGasCosts(t *testing.T) {
236236
},
237237
{
238238
function: "native_issuance",
239-
expectedGas: 200,
239+
expectedGas: 400,
240240
description: "Get issuance for the current block",
241241
},
242242
}

0 commit comments

Comments
 (0)