diff --git a/e2e/setup.go b/e2e/setup.go index a0a39381..7e234e67 100644 --- a/e2e/setup.go +++ b/e2e/setup.go @@ -20,13 +20,12 @@ import ( "github.com/stretchr/testify/require" ) -// Use of single port makes tests incapable of running in parallel const ( - PrivateKey = "SIGNER_PRIVATE_KEY" + privateKey = "SIGNER_PRIVATE_KEY" transport = "http" - SvcName = "eigenda_proxy" + svcName = "eigenda_proxy" host = "127.0.0.1" - HoleskyDA = "disperser-holesky.eigenda.xyz:443" + holeskyDA = "disperser-holesky.eigenda.xyz:443" ) type TestSuite struct { @@ -39,7 +38,7 @@ func CreateTestSuite(t *testing.T, useMemory bool) (TestSuite, func()) { ctx := context.Background() // load signer key from environment - pk := os.Getenv(PrivateKey) + pk := os.Getenv(privateKey) if pk == "" && !useMemory { t.Fatal("SIGNER_PRIVATE_KEY environment variable not set") } @@ -48,13 +47,11 @@ func CreateTestSuite(t *testing.T, useMemory bool) (TestSuite, func()) { Level: log.LevelDebug, Format: oplog.FormatLogFmt, Color: true, - }).New("role", SvcName) - - // oplog.SetGlobalLogHandler(log.Handler()) + }).New("role", svcName) eigendaCfg := eigenda.Config{ ClientConfig: clients.EigenDAClientConfig{ - RPC: HoleskyDA, + RPC: holeskyDA, StatusQueryTimeout: time.Minute * 45, StatusQueryRetryInterval: time.Second * 1, DisableTLS: false, diff --git a/scripts/op-devnet-allocs.sh b/scripts/op-devnet-allocs.sh index 03176ebb..3f6af539 100755 --- a/scripts/op-devnet-allocs.sh +++ b/scripts/op-devnet-allocs.sh @@ -28,4 +28,4 @@ if [ $? -eq 0 ] ; then exit ${STATUS} else echo "Failed to clean up ${REPO_NAME} repo" - exit ${STATUS \ No newline at end of file + exit ${STATUS} \ No newline at end of file diff --git a/store/memory.go b/store/memory.go index 0186d3b1..9d80edae 100644 --- a/store/memory.go +++ b/store/memory.go @@ -104,8 +104,8 @@ func (e *MemStore) pruneExpired() { // Get fetches a value from the store. func (e *MemStore) Get(ctx context.Context, commit []byte, domain eigendacommon.DomainType) ([]byte, error) { e.reads += 1 - e.RLock() - defer e.RUnlock() + e.Lock() + defer e.Unlock() var cert common.Certificate err := rlp.DecodeBytes(commit, &cert) diff --git a/store/types.go b/store/types.go index ff99f1ce..5a283d18 100644 --- a/store/types.go +++ b/store/types.go @@ -11,6 +11,6 @@ type Store interface { Get(ctx context.Context, key []byte, domain common.DomainType) ([]byte, error) // Put inserts the given value into the key-value data store. Put(ctx context.Context, value []byte) (key []byte, err error) - // Entries returns the number of values in the store; only used for memstore + // Stats returns the current usage metrics of the key-value data store. Stats() *common.Stats }