Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sasurobert committed Apr 29, 2024
1 parent 27f4efb commit 31dea4d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vmhost/contexts/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func (context *runtimeContext) VerifyContractCode() error {
}

enableEpochsHandler := context.host.EnableEpochsHandler()
if !enableEpochsHandler.IsFlagEnabled(vmhost.CryptoAPIV2Flag) {
if !enableEpochsHandler.IsFlagEnabled(vmhost.CryptoOpcodesV2Flag) {
err = context.checkIfContainsNewCryptoApi()

Check warning on line 685 in vmhost/contexts/runtime.go

View check run for this annotation

Codecov / codecov/patch

vmhost/contexts/runtime.go#L684-L685

Added lines #L684 - L685 were not covered by tests
if err != nil {
logRuntime.Trace("verify contract code", "error", err)
Expand Down
2 changes: 1 addition & 1 deletion vmhost/contexts/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (context *storageContext) GetStorageFromAddress(address []byte, key []byte)
return nil, 0, false, nil
}

isReadFromUserAddress := context.host.EnableEpochsHandler().IsFlagEnabled(vmhost.CryptoAPIV2Flag) &&
isReadFromUserAddress := context.host.EnableEpochsHandler().IsFlagEnabled(vmhost.CryptoOpcodesV2Flag) &&
!core.IsSmartContractAddress(address)

metadata := vmcommon.CodeMetadataFromBytes(userAcc.GetCodeMetadata())
Expand Down
4 changes: 2 additions & 2 deletions vmhost/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package vmhost
import "github.com/multiversx/mx-chain-core-go/core"

const (
// CryptoAPIV2Flag defines the flag that activates the new crypto APIs for RC1.7
CryptoAPIV2Flag core.EnableEpochFlag = "CryptoAPIV2Flag"
// CryptoOpcodesV2Flag defines the flag that activates the new crypto APIs for RC1.7
CryptoOpcodesV2Flag core.EnableEpochFlag = "CryptoOpcodesV2Flag"
)
2 changes: 1 addition & 1 deletion vmhost/hostCore/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const internalVMErrors = "internalVMErrors"

// allFlags must have all flags used by mx-chain-vm-go in the current version
var allFlags = []core.EnableEpochFlag{
vmhost.CryptoAPIV2Flag,
vmhost.CryptoOpcodesV2Flag,
}

// vmHost implements HostContext interface.
Expand Down

0 comments on commit 31dea4d

Please sign in to comment.