21
21
#include <stdio.h>
22
22
#include <wire/peer_wire.h>
23
23
24
+ #define chainparams_get_ln_port simple_get_ln_port
24
25
#define io_write_ simple_write
25
26
#define io_read_ simple_read
26
27
#define io_close simple_close
@@ -45,7 +46,13 @@ static struct io_plan *simple_close(struct io_conn *conn)
45
46
return NULL ;
46
47
}
47
48
48
- #include "../connectd/handshake.c"
49
+ static int simple_get_ln_port (const struct chainparams * params UNNEEDED )
50
+ {
51
+ return 9735 ;
52
+ }
53
+
54
+ #include "../common/wireaddr.h"
55
+ #include "../connectd/handshake.c"
49
56
50
57
/* This makes the handshake prototypes work. */
51
58
struct io_conn {
@@ -322,7 +329,7 @@ int main(int argc, char *argv[])
322
329
opt_usage_exit_fail ("Invalid id %.*s" ,
323
330
(int )(at - argv [1 ]), argv [1 ]);
324
331
325
- if (!parse_wireaddr_internal (at + 1 , & addr , DEFAULT_PORT , NULL ,
332
+ if (!parse_wireaddr_internal (at + 1 , & addr , simple_get_ln_port ( NULL ) , NULL ,
326
333
true, false, true, & err_msg ))
327
334
opt_usage_exit_fail ("%s '%s'" , err_msg , argv [1 ]);
328
335
@@ -376,4 +383,3 @@ int main(int argc, char *argv[])
376
383
handshake_success , argv + 2 );
377
384
exit (0 );
378
385
}
379
-
0 commit comments