@@ -159,8 +159,8 @@ func (n *node) reuseSigner(signer *signing.EdSigner) *node {
159
159
return n
160
160
}
161
161
162
- func (n * node ) withDb () * node {
163
- n .db = sql .InMemory ( )
162
+ func (n * node ) withDb (tb testing. TB ) * node {
163
+ n .db = sql .InMemoryTest ( tb )
164
164
n .atxsdata = atxsdata .New ()
165
165
n .proposals = store .New ()
166
166
return n
@@ -391,7 +391,7 @@ func (cl *lockstepCluster) addActive(n int) *lockstepCluster {
391
391
for i := last ; i < last + n ; i ++ {
392
392
nn := (& node {t : cl .t , i : i }).
393
393
withController ().withSyncer ().withPublisher ().
394
- withClock ().withDb ().withSigner ().withAtx (cl .units .min , cl .units .max ).
394
+ withClock ().withDb (cl . t ).withSigner ().withAtx (cl .units .min , cl .units .max ).
395
395
withStreamRequester ().withOracle ().withHare ()
396
396
if cl .mockVerify {
397
397
nn = nn .withVerifier ()
@@ -406,7 +406,7 @@ func (cl *lockstepCluster) addInactive(n int) *lockstepCluster {
406
406
for i := last ; i < last + n ; i ++ {
407
407
cl .addNode ((& node {t : cl .t , i : i }).
408
408
withController ().withSyncer ().withPublisher ().
409
- withClock ().withDb ().withSigner ().
409
+ withClock ().withDb (cl . t ).withSigner ().
410
410
withStreamRequester ().withOracle ().withHare ())
411
411
}
412
412
return cl
@@ -419,7 +419,7 @@ func (cl *lockstepCluster) addEquivocators(n int) *lockstepCluster {
419
419
cl .addNode ((& node {t : cl .t , i : i }).
420
420
reuseSigner (cl .nodes [i - last ].signer ).
421
421
withController ().withSyncer ().withPublisher ().
422
- withClock ().withDb ().withAtx (cl .units .min , cl .units .max ).
422
+ withClock ().withDb (cl . t ).withAtx (cl .units .min , cl .units .max ).
423
423
withStreamRequester ().withOracle ().withHare ())
424
424
}
425
425
return cl
0 commit comments