Skip to content

Commit d05f1da

Browse files
Integrate cadence metering changes
1 parent d03f481 commit d05f1da

File tree

16 files changed

+1158
-198
lines changed

16 files changed

+1158
-198
lines changed

cmd/util/ledger/migrations/migrator_runtime.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ func NewInterpreterMigrationRuntime(
182182
runtime.NewCodesAndPrograms(),
183183
basicMigrationRuntime.Storage,
184184
nil,
185+
nil,
186+
nil,
185187
)
186188

187189
inter, err := interpreter.NewInterpreter(

fvm/environment/meter.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import (
44
"context"
55

66
"github.com/onflow/cadence/common"
7-
"github.com/onflow/cadence/runtime"
8-
97
"github.com/onflow/flow-go/fvm/errors"
108
"github.com/onflow/flow-go/fvm/meter"
119
"github.com/onflow/flow-go/fvm/storage/state"
@@ -71,7 +69,11 @@ var MainnetExecutionEffortWeights = meter.ExecutionEffortWeights{
7169
}
7270

7371
type Meter interface {
74-
runtime.MeterInterface
72+
common.Gauge
73+
74+
ComputationUsed() (uint64, error)
75+
MemoryUsed() (uint64, error)
76+
InteractionUsed() (uint64, error)
7577

7678
ComputationIntensities() meter.MeteredComputationIntensities
7779
ComputationAvailable(common.ComputationUsage) bool

0 commit comments

Comments
 (0)