Skip to content

Commit

Permalink
test: add race
Browse files Browse the repository at this point in the history
  • Loading branch information
krish-nr committed Feb 19, 2024
1 parent aff69d2 commit 66cb434
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import (
"time"

"github.com/cespare/cp"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto/signify"
"github.com/ethereum/go-ethereum/internal/build"
Expand Down Expand Up @@ -225,6 +226,9 @@ func doInstall(cmdline []string) {
// We use -trimpath to avoid leaking local paths into the built executables.
gobuild.Args = append(gobuild.Args, "-trimpath")

// Add -race parameter
gobuild.Args = append(gobuild.Args, "-race")

// Show packages during build.
gobuild.Args = append(gobuild.Args, "-v")

Expand Down
4 changes: 0 additions & 4 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
Expand Down Expand Up @@ -179,10 +178,8 @@ func (s *stateObject) getOriginStorage(key common.Hash) (common.Hash, bool) {
}
// if L1 cache miss, try to get it from shared pool
if s.sharedOriginStorage != nil {
log.Info("debug: sharedOriginStorage enabled")
val, ok := s.sharedOriginStorage.Load(key)
if !ok {
log.Info("debug: get OriginStorage", "key", key, "value", val)
return common.Hash{}, false
}
s.originStorage[key] = val.(common.Hash)
Expand All @@ -193,7 +190,6 @@ func (s *stateObject) getOriginStorage(key common.Hash) (common.Hash, bool) {

func (s *stateObject) setOriginStorage(key common.Hash, value common.Hash) {
if s.db.writeOnSharedStorage && s.sharedOriginStorage != nil {
log.Info("debug: set OriginStorage", "key", key, "value", value)
s.sharedOriginStorage.Store(key, value)
}
s.originStorage[key] = value
Expand Down

0 comments on commit 66cb434

Please sign in to comment.