@@ -113,10 +113,10 @@ func TestNewDeliverService(t *testing.T) {
113113 ConnFactory : connFactory ,
114114 })
115115 assert .NoError (t , err )
116- assert .NoError (t , service .StartDeliverForChannel ("TEST_CHAINID" , & mocks.MockLedgerInfo {0 }))
116+ assert .NoError (t , service .StartDeliverForChannel ("TEST_CHAINID" , & mocks.MockLedgerInfo {0 }, func () {} ))
117117
118118 // Lets start deliver twice
119- assert .Error (t , service .StartDeliverForChannel ("TEST_CHAINID" , & mocks.MockLedgerInfo {0 }), "can't start delivery" )
119+ assert .Error (t , service .StartDeliverForChannel ("TEST_CHAINID" , & mocks.MockLedgerInfo {0 }, func () {} ), "can't start delivery" )
120120 // Lets stop deliver that not started
121121 assert .Error (t , service .StopDeliverForChannel ("TEST_CHAINID2" ), "can't stop delivery" )
122122
@@ -130,7 +130,7 @@ func TestNewDeliverService(t *testing.T) {
130130 assert .Equal (t , 0 , connNumber )
131131 assertBlockDissemination (0 , gossipServiceAdapter .GossipBlockDisseminations , t )
132132 assert .Equal (t , atomic .LoadInt32 (& blocksDeliverer .RecvCnt ), atomic .LoadInt32 (& gossipServiceAdapter .AddPayloadsCnt ))
133- assert .Error (t , service .StartDeliverForChannel ("TEST_CHAINID" , & mocks.MockLedgerInfo {0 }), "Delivery service is stopping" )
133+ assert .Error (t , service .StartDeliverForChannel ("TEST_CHAINID" , & mocks.MockLedgerInfo {0 }, func () {} ), "Delivery service is stopping" )
134134 assert .Error (t , service .StopDeliverForChannel ("TEST_CHAINID" ), "Delivery service is stopping" )
135135}
136136
@@ -157,7 +157,7 @@ func TestDeliverServiceRestart(t *testing.T) {
157157 li := & mocks.MockLedgerInfo {Height : uint64 (100 )}
158158 os .SetNextExpectedSeek (uint64 (100 ))
159159
160- err = service .StartDeliverForChannel ("TEST_CHAINID" , li )
160+ err = service .StartDeliverForChannel ("TEST_CHAINID" , li , func () {} )
161161 assert .NoError (t , err , "can't start delivery" )
162162 // Check that delivery client requests blocks in order
163163 go os .SendBlock (uint64 (100 ))
@@ -203,7 +203,7 @@ func TestDeliverServiceFailover(t *testing.T) {
203203 os1 .SetNextExpectedSeek (uint64 (100 ))
204204 os2 .SetNextExpectedSeek (uint64 (100 ))
205205
206- err = service .StartDeliverForChannel ("TEST_CHAINID" , li )
206+ err = service .StartDeliverForChannel ("TEST_CHAINID" , li , func () {} )
207207 assert .NoError (t , err , "can't start delivery" )
208208 // We need to discover to which instance the client connected to
209209 go os1 .SendBlock (uint64 (100 ))
@@ -278,7 +278,7 @@ func TestDeliverServiceServiceUnavailable(t *testing.T) {
278278 os1 .SetNextExpectedSeek (li .Height )
279279 os2 .SetNextExpectedSeek (li .Height )
280280
281- err = service .StartDeliverForChannel ("TEST_CHAINID" , li )
281+ err = service .StartDeliverForChannel ("TEST_CHAINID" , li , func () {} )
282282 assert .NoError (t , err , "can't start delivery" )
283283
284284 waitForConnectionToSomeOSN := func () (* mocks.Orderer , * mocks.Orderer ) {
@@ -367,7 +367,7 @@ func TestDeliverServiceShutdown(t *testing.T) {
367367
368368 li := & mocks.MockLedgerInfo {Height : uint64 (100 )}
369369 os .SetNextExpectedSeek (uint64 (100 ))
370- err = service .StartDeliverForChannel ("TEST_CHAINID" , li )
370+ err = service .StartDeliverForChannel ("TEST_CHAINID" , li , func () {} )
371371 assert .NoError (t , err , "can't start delivery" )
372372
373373 // Check that delivery service requests blocks in order
0 commit comments