@@ -27,7 +27,7 @@ func TestWriteThroughWorks(t *testing.T) {
27
27
}
28
28
exchbstore := blockstore .NewBlockstore (dssync .MutexWrap (ds .NewMapDatastore ()))
29
29
exch := offline .Exchange (exchbstore )
30
- bserv := NewWriteThrough (bstore , exch )
30
+ bserv := New (bstore , exch , WriteThrough () )
31
31
bgen := butil .NewBlockGenerator ()
32
32
33
33
block := bgen .Next ()
@@ -62,7 +62,7 @@ func TestExchangeWrite(t *testing.T) {
62
62
offline .Exchange (exchbstore ),
63
63
0 ,
64
64
}
65
- bserv := NewWriteThrough (bstore , exch )
65
+ bserv := New (bstore , exch , WriteThrough () )
66
66
bgen := butil .NewBlockGenerator ()
67
67
68
68
for name , fetcher := range map [string ]BlockGetter {
@@ -136,7 +136,7 @@ func TestLazySessionInitialization(t *testing.T) {
136
136
session := offline .Exchange (bstore2 )
137
137
exch := offline .Exchange (bstore3 )
138
138
sessionExch := & fakeSessionExchange {Interface : exch , session : session }
139
- bservSessEx := NewWriteThrough (bstore , sessionExch )
139
+ bservSessEx := New (bstore , sessionExch , WriteThrough () )
140
140
bgen := butil .NewBlockGenerator ()
141
141
142
142
block := bgen .Next ()
@@ -234,7 +234,7 @@ func TestNilExchange(t *testing.T) {
234
234
block := bgen .Next ()
235
235
236
236
bs := blockstore .NewBlockstore (dssync .MutexWrap (ds .NewMapDatastore ()))
237
- bserv := NewWriteThrough (bs , nil )
237
+ bserv := New (bs , nil , WriteThrough () )
238
238
sess := NewSession (ctx , bserv )
239
239
_ , err := sess .GetBlock (ctx , block .Cid ())
240
240
if ! ipld .IsNotFound (err ) {
0 commit comments