Skip to content

Commit 7391a7d

Browse files
fix(authority): charge gas if fetching validation (#1439)
1 parent c1a1888 commit 7391a7d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎builtin/authority_native.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ package builtin
88
import (
99
"github.com/ethereum/go-ethereum/common"
1010

11+
"github.com/vechain/thor/v2/builtin/gascharger"
12+
1113
"github.com/vechain/thor/v2/thor"
1214
"github.com/vechain/thor/v2/xenv"
1315
)
@@ -124,7 +126,7 @@ func init() {
124126
// Use staker Transition Period logic
125127
// to ensure that transitioning validators are marked as endorsed
126128
env.UseGas(thor.GetBalanceGas)
127-
isEndorsed, err := Staker.Native(env.State()).TransitionPeriodBalanceCheck(
129+
isEndorsed, err := Staker.NativeMetered(env.State(), gascharger.New(env)).TransitionPeriodBalanceCheck(
128130
env.ForkConfig(),
129131
env.BlockContext().Number,
130132
endorsement,

0 commit comments

Comments
 (0)