Skip to content

Commit

Permalink
next round
Browse files Browse the repository at this point in the history
  • Loading branch information
lukanus committed Mar 20, 2023
1 parent 4c87fbc commit 577b32e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 969 deletions.
10 changes: 8 additions & 2 deletions datastore/datastore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import (

datastore "github.com/blocknative/dreamboat/datastore"
"github.com/blocknative/dreamboat/test/common"
"github.com/google/uuid"
lru "github.com/hashicorp/golang-lru/v2"

tBadger "github.com/blocknative/dreamboat/datastore/transport/badger"

"github.com/blocknative/dreamboat/structs"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/flashbots/go-boost-utils/bls"
Expand All @@ -24,9 +27,12 @@ func TestPutGetPayload(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

store := newMockDatastore()
tB, err := tBadger.Open("/tmp/" + t.Name() + uuid.New().String())
require.NoError(t, err)
defer tB.Close()

cache, _ := lru.New[structs.PayloadKey, structs.BlockBidAndTrace](10)
ds := datastore.Datastore{TTLStorage: store, PayloadCache: cache}
ds := datastore.Datastore{TTLStorage: tB, PayloadCache: cache}

payload := randomBlockBidAndTrace()

Expand Down
Loading

0 comments on commit 577b32e

Please sign in to comment.