File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,11 +78,6 @@ export class UDPTransportService
7878 this . bindAddrs . push ( this . ip6 . addr ) ;
7979 this . ipMode . ip6 = true ;
8080 }
81- if ( this . ip4 && this . ip6 ) {
82- if ( this . ip4 . opts . port === this . ip6 . opts . port ) {
83- throw new Error ( "Configured bind multiaddrs must have different ports" ) ;
84- }
85- }
8681 }
8782
8883 public async start ( ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -106,13 +106,13 @@ describe("UDP4+6 transport", () => {
106106 const nodeIdA = bytesToHex ( new Uint8Array ( 32 ) . fill ( 1 ) ) ;
107107 const portA = 49523 ;
108108 const multiaddr4A = multiaddr ( `/ip4/${ address4 } /udp/${ portA } ` ) ;
109- const multiaddr6A = multiaddr ( `/ip6/${ address6 } /udp/${ portA + 1 } ` ) ;
109+ const multiaddr6A = multiaddr ( `/ip6/${ address6 } /udp/${ portA } ` ) ;
110110 const a = new UDPTransportService ( { bindAddrs : { ip4 : multiaddr4A , ip6 : multiaddr6A } , nodeId : nodeIdA } ) ;
111111
112112 const nodeIdB = bytesToHex ( new Uint8Array ( 32 ) . fill ( 2 ) ) ;
113113 const portB = portA + 1 ;
114114 const multiaddr4B = multiaddr ( `/ip4/${ address4 } /udp/${ portB } ` ) ;
115- const multiaddr6B = multiaddr ( `/ip6/${ address6 } /udp/${ portB + 1 } ` ) ;
115+ const multiaddr6B = multiaddr ( `/ip6/${ address6 } /udp/${ portB } ` ) ;
116116 const b = new UDPTransportService ( { bindAddrs : { ip4 : multiaddr4B , ip6 : multiaddr6B } , nodeId : nodeIdB } ) ;
117117
118118 before ( async ( ) => {
You can’t perform that action at this time.
0 commit comments