@@ -90,7 +90,7 @@ const echoService = (components: EchoServiceComponents): unknown => {
9090 stream , stream
9191 )
9292 } , {
93- runOnTransientConnection : true
93+ runOnLimitedConnection : true
9494 } )
9595 } ,
9696 stop ( ) { }
@@ -560,7 +560,7 @@ describe('circuit-relay', () => {
560560
561561 // open hop stream and try to connect to remote
562562 const stream = await local.dialProtocol(ma, RELAY_V2_HOP_CODEC, {
563- runOnTransientConnection : true
563+ runOnLimitedConnection : true
564564 })
565565
566566 const hopStream = pbStream(stream).pb(HopMessage)
@@ -671,7 +671,7 @@ describe('circuit-relay', () => {
671671 // connection from local through relay should be marked transient
672672 const connections = remote . getConnections ( local . peerId )
673673 expect ( connections ) . to . have . lengthOf ( 1 )
674- expect ( connections ) . to . have . nested . property ( '[0].transient' , true )
674+ expect ( connections ) . to . have . nested . property ( '[0].limits' ) . that . is . not . null ( )
675675 } )
676676
677677 it ( 'should not open streams on a transient connection' , async ( ) => {
@@ -697,7 +697,7 @@ describe('circuit-relay', () => {
697697 await remote . handle ( protocol , ( { stream } ) => {
698698 void pipe ( stream , stream )
699699 } , {
700- runOnTransientConnection : false
700+ runOnLimitedConnection : false
701701 } )
702702
703703 // discover relay and make reservation
@@ -712,7 +712,7 @@ describe('circuit-relay', () => {
712712 expect ( connection ) . to . have . property ( 'transient' , true )
713713
714714 await expect ( connection . newStream ( '/my-protocol/1.0.0' , {
715- runOnTransientConnection : false
715+ runOnLimitedConnection : false
716716 } ) )
717717 . to . eventually . be . rejected . with . property ( 'code' , 'ERR_TRANSIENT_CONNECTION' )
718718 } )
@@ -724,7 +724,7 @@ describe('circuit-relay', () => {
724724 await remote . handle ( protocol , ( { stream } ) => {
725725 void pipe ( stream , stream )
726726 } , {
727- runOnTransientConnection : true
727+ runOnLimitedConnection : true
728728 } )
729729
730730 // discover relay and make reservation
@@ -739,7 +739,7 @@ describe('circuit-relay', () => {
739739 expect ( connection ) . to . have . property ( 'transient' , true )
740740
741741 await expect ( connection . newStream ( '/my-protocol/1.0.0' , {
742- runOnTransientConnection : true
742+ runOnLimitedConnection : true
743743 } ) )
744744 . to . eventually . be . ok ( )
745745 } )
@@ -912,15 +912,15 @@ describe('circuit-relay', () => {
912912 } catch { }
913913 } )
914914 } , {
915- runOnTransientConnection : true
915+ runOnLimitedConnection : true
916916 } )
917917
918918 // dial the remote from the local through the relay
919919 const ma = getRelayAddress ( remote )
920920
921921 try {
922922 const stream = await local . dialProtocol ( ma , protocol , {
923- runOnTransientConnection : true
923+ runOnLimitedConnection : true
924924 } )
925925
926926 await stream . sink ( async function * ( ) {
@@ -1056,7 +1056,7 @@ describe('circuit-relay', () => {
10561056 const ma = getRelayAddress ( remote )
10571057
10581058 const stream = await local . dialProtocol ( ma , ECHO_PROTOCOL , {
1059- runOnTransientConnection : true
1059+ runOnLimitedConnection : true
10601060 } )
10611061
10621062 // write more than the default data limit
@@ -1075,7 +1075,7 @@ describe('circuit-relay', () => {
10751075 const ma = getRelayAddress ( remote )
10761076
10771077 const stream = await local . dialProtocol ( ma , ECHO_PROTOCOL , {
1078- runOnTransientConnection : true
1078+ runOnLimitedConnection : true
10791079 } )
10801080
10811081 let finished = false
@@ -1107,21 +1107,21 @@ describe('circuit-relay', () => {
11071107 expect ( finish - start ) . to . be . greaterThan ( defaultDurationLimit )
11081108 } )
11091109
1110- it ( 'should not mark an outgoing connection as transient ' , async ( ) => {
1110+ it ( 'should not mark an outgoing connection as limited ' , async ( ) => {
11111111 const ma = getRelayAddress ( remote )
11121112
11131113 const connection = await local . dial ( ma )
1114- expect ( connection ) . to . have . property ( 'transient' , false )
1114+ expect ( connection ) . to . not . have . property ( 'limits' )
11151115 } )
11161116
1117- it ( 'should not mark an incoming connection as transient ' , async ( ) => {
1117+ it ( 'should not mark an incoming connection as limited ' , async ( ) => {
11181118 const ma = getRelayAddress ( remote )
11191119
11201120 await local . dial ( ma )
11211121
11221122 const connections = remote . getConnections ( local . peerId )
11231123 expect ( connections ) . to . have . lengthOf ( 1 )
1124- expect ( connections ) . to . have . nested . property ( '[0].transient' , false )
1124+ expect ( connections ) . to . not . have . nested . property ( '[0].limits' )
11251125 } )
11261126 } )
11271127} )
0 commit comments