diff --git a/pkg/consensus/consensus.go b/pkg/consensus/consensus.go index e7a389f03..585e34aa8 100644 --- a/pkg/consensus/consensus.go +++ b/pkg/consensus/consensus.go @@ -56,6 +56,7 @@ type Ledger interface { PoolTx(t *transaction.Transaction, pools ...*mempool.Pool) error SubscribeForBlocks(ch chan<- *coreb.Block) UnsubscribeFromBlocks(ch chan<- *coreb.Block) + GetBaseExecFee() int64 interop.Ledger mempool.Feer } diff --git a/pkg/core/interop/context.go b/pkg/core/interop/context.go index 22c1486e8..9217e8d58 100644 --- a/pkg/core/interop/context.go +++ b/pkg/core/interop/context.go @@ -37,7 +37,6 @@ const ( type Ledger interface { BlockHeight() uint32 CurrentBlockHash() util.Uint256 - GetBaseExecFee() int64 GetBlock(hash util.Uint256) (*block.Block, error) GetConfig() config.ProtocolConfiguration GetHeaderHash(int) util.Uint256 diff --git a/pkg/core/native/interop.go b/pkg/core/native/interop.go index 92fdf3717..3fd2ab57a 100644 --- a/pkg/core/native/interop.go +++ b/pkg/core/native/interop.go @@ -42,7 +42,7 @@ func Call(ic *interop.Context) error { return fmt.Errorf("missing call flags for native %d `%s` operation call: %05b vs %05b", version, m.MD.Name, ic.VM.Context().GetCallFlags(), m.RequiredFlags) } - invokeFee := m.CPUFee*ic.Chain.GetBaseExecFee() + + invokeFee := m.CPUFee*ic.BaseExecFee() + m.StorageFee*ic.BaseStorageFee() if !ic.VM.AddGas(invokeFee) { return errors.New("gas limit exceeded")