Skip to content

Commit

Permalink
Merge pull request #4604 from onflow/tarak/fvm-random-script-emulator…
Browse files Browse the repository at this point in the history
…-fix

[FVM] enable unsafe Random for script execution
  • Loading branch information
tarakby authored Aug 5, 2023
2 parents 6ece1c3 + e97a236 commit 04e12b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fvm/environment/random_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"

"github.com/onflow/flow-go/crypto/random"
"github.com/onflow/flow-go/fvm/errors"
"github.com/onflow/flow-go/fvm/storage/state"
"github.com/onflow/flow-go/fvm/tracing"
"github.com/onflow/flow-go/model/flow"
Expand Down Expand Up @@ -142,5 +141,5 @@ func NewDummyRandomGenerator() RandomGenerator {
// UnsafeRandom() returns an error because executing scripts
// does not support randomness APIs.
func (gen *dummyRandomGenerator) UnsafeRandom() (uint64, error) {
return 0, errors.NewOperationNotSupportedError("Random")
return 0, nil
}

0 comments on commit 04e12b3

Please sign in to comment.