@@ -420,7 +420,7 @@ func TestProcessLoopRegularError(t *testing.T) {
420420	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
421421
422422	mockSupport  :=  & mockmultichain.ConsenterSupport {
423- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
423+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
424424		BlockCutterVal : mockblockcutter .NewReceiver (),
425425		ChainIDVal :     mockChannel .topic (),
426426		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -477,7 +477,7 @@ func TestProcessLoopRegularQueueEnvelope(t *testing.T) {
477477	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
478478
479479	mockSupport  :=  & mockmultichain.ConsenterSupport {
480- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
480+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
481481		BlockCutterVal : mockblockcutter .NewReceiver (),
482482		ChainIDVal :     mockChannel .topic (),
483483		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -530,7 +530,7 @@ func TestProcessLoopRegularCutBlock(t *testing.T) {
530530	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
531531
532532	mockSupport  :=  & mockmultichain.ConsenterSupport {
533- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
533+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
534534		BlockCutterVal : mockblockcutter .NewReceiver (),
535535		ChainIDVal :     mockChannel .topic (),
536536		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -546,7 +546,7 @@ func TestProcessLoopRegularCutBlock(t *testing.T) {
546546	go  func () { // Note: Unlike the CONNECT test case, the following does NOT introduce a race condition, so we're good 
547547		mockSupport .BlockCutterVal .Block  <-  struct {}{} // Let the `mockblockcutter.Ordered` call return 
548548		logger .Debugf ("Mock blockcutter's Ordered call has returned" )
549- 		<- mockSupport .Batches                                           // Let the `mockConsenterSupport.WriteBlock` proceed 
549+ 		<- mockSupport .Blocks                                             // Let the `mockConsenterSupport.WriteBlock` proceed 
550550		logger .Debug ("Closing exitChan to exit the infinite for loop" ) // We are guaranteed to hit the exitChan branch after hitting the REGULAR branch at least once 
551551		close (exitChan )                                                // Identical to chain.Halt() 
552552		logger .Debug ("exitChan closed" )
@@ -590,7 +590,7 @@ func TestProcessLoopRegularCutTwoBlocks(t *testing.T) {
590590	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
591591
592592	mockSupport  :=  & mockmultichain.ConsenterSupport {
593- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
593+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
594594		BlockCutterVal : mockblockcutter .NewReceiver (),
595595		ChainIDVal :     mockChannel .topic (),
596596		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -614,15 +614,13 @@ func TestProcessLoopRegularCutTwoBlocks(t *testing.T) {
614614		logger .Debugf ("Mock blockcutter's Ordered call has returned for the second time" )
615615
616616		select  {
617- 		case  <- mockSupport .Batches : // Let the `mockConsenterSupport.WriteBlock` proceed 
618- 			block1  =  mockSupport .WriteBlockVal 
617+ 		case  block1  =  <- mockSupport .Blocks : // Let the `mockConsenterSupport.WriteBlock` proceed 
619618		case  <- time .After (hitBranch ):
620619			logger .Fatalf ("Did not receive a block from the blockcutter as expected" )
621620		}
622621
623622		select  {
624- 		case  <- mockSupport .Batches :
625- 			block2  =  mockSupport .WriteBlockVal 
623+ 		case  block2  =  <- mockSupport .Blocks :
626624		case  <- time .After (hitBranch ):
627625			logger .Fatalf ("Did not receive a block from the blockcutter as expected" )
628626		}
@@ -677,7 +675,7 @@ func TestProcessLoopRegularAndSendTimeToCutRegular(t *testing.T) {
677675	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
678676
679677	mockSupport  :=  & mockmultichain.ConsenterSupport {
680- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
678+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
681679		BlockCutterVal : mockblockcutter .NewReceiver (),
682680		ChainIDVal :     mockChannel .topic (),
683681		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -746,7 +744,7 @@ func TestProcessLoopRegularAndSendTimeToCutError(t *testing.T) {
746744	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
747745
748746	mockSupport  :=  & mockmultichain.ConsenterSupport {
749- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
747+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
750748		BlockCutterVal : mockblockcutter .NewReceiver (),
751749		ChainIDVal :     mockChannel .topic (),
752750		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -801,7 +799,7 @@ func TestProcessLoopTimeToCutFromReceivedMessageRegular(t *testing.T) {
801799	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
802800
803801	mockSupport  :=  & mockmultichain.ConsenterSupport {
804- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
802+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
805803		BlockCutterVal : mockblockcutter .NewReceiver (),
806804		ChainIDVal :     mockChannel .topic (),
807805		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -818,7 +816,7 @@ func TestProcessLoopTimeToCutFromReceivedMessageRegular(t *testing.T) {
818816	mockSupport .BlockCutterVal .Ordered (newMockEnvelope ("fooMessage" ))
819817
820818	go  func () { // Note: Unlike the CONNECT test case, the following does NOT introduce a race condition, so we're good 
821- 		<- mockSupport .Batches                                           // Let the `mockConsenterSupport.WriteBlock` proceed 
819+ 		<- mockSupport .Blocks                                             // Let the `mockConsenterSupport.WriteBlock` proceed 
822820		logger .Debug ("Closing exitChan to exit the infinite for loop" ) // We are guaranteed to hit the exitChan branch after hitting the REGULAR branch at least once 
823821		close (exitChan )                                                // Identical to chain.Halt() 
824822		logger .Debug ("exitChan closed" )
@@ -858,7 +856,7 @@ func TestProcessLoopTimeToCutFromReceivedMessageZeroBatch(t *testing.T) {
858856	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
859857
860858	mockSupport  :=  & mockmultichain.ConsenterSupport {
861- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
859+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
862860		BlockCutterVal : mockblockcutter .NewReceiver (),
863861		ChainIDVal :     mockChannel .topic (),
864862		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -902,7 +900,7 @@ func TestProcessLoopTimeToCutFromReceivedMessageLargerThanExpected(t *testing.T)
902900	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
903901
904902	mockSupport  :=  & mockmultichain.ConsenterSupport {
905- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
903+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
906904		BlockCutterVal : mockblockcutter .NewReceiver (),
907905		ChainIDVal :     mockChannel .topic (),
908906		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
@@ -948,7 +946,7 @@ func TestProcessLoopTimeToCutFromReceivedMessageStale(t *testing.T) {
948946	assert .NoError (t , err , "Expected no error when setting up the mock partition consumer" )
949947
950948	mockSupport  :=  & mockmultichain.ConsenterSupport {
951- 		Batches :        make (chan  [] * cb.Envelope ), // WriteBlock will post here 
949+ 		Blocks :          make (chan  * cb.Block ), // WriteBlock will post here 
952950		BlockCutterVal : mockblockcutter .NewReceiver (),
953951		ChainIDVal :     mockChannel .topic (),
954952		HeightVal :      lastCutBlockNumber , // Incremented during the WriteBlock call 
0 commit comments