Skip to content

Commit

Permalink
Remove files from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrantil committed Jul 19, 2024
1 parent 77171e6 commit cb6d82d
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 56 deletions.
4 changes: 0 additions & 4 deletions __init__.py

This file was deleted.

1 change: 1 addition & 0 deletions contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ Core Lightning Documentation
lightning-sendcustommsg <lightning-sendcustommsg.7.md>
lightning-sendinvoice <lightning-sendinvoice.7.md>
lightning-sendonion <lightning-sendonion.7.md>
lightning-sendonionmessage <lightning-sendonionmessage.7.md>
lightning-sendpay <lightning-sendpay.7.md>
lightning-sendpsbt <lightning-sendpsbt.7.md>
lightning-setchannel <lightning-setchannel.7.md>
Expand Down
2 changes: 1 addition & 1 deletion doc/lightningd-config.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ offering more control over the connection process.
An empty 'IPADDRESS' is a special value that clears any previously saved alternate bind addresses,
effectively resetting this setting. (Added in v24.08).

* **alt-annouonce-addr**=*\[IPADDRESS\[:PORT\]]\*
* **alt-announce-addr**=*\[IPADDRESS\[:PORT\]]\*

Provide an alternative IP address (v4 or v6) and optionally a port,
which is bound by `alt-bind-addr`, to any established channel peers.
Expand Down
29 changes: 0 additions & 29 deletions flow_chart.md

This file was deleted.

4 changes: 2 additions & 2 deletions lightningd/lightningd.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ struct lightningd {
struct wireaddr *announceable;

/* Alternative address for peer connections not publicly announced */
u8 *alt_addr; /* FIXME(maxrantil): make into stuct wireaddr_internal * */
u8 *alt_addr;
/* Alternative binding address for peer connections not publicly announced */
u8 *alt_bind_addr; /* FIXME(maxrantil): make into stuct wireaddr_internal * */
u8 *alt_bind_addr;

/* Current node announcement (if any) */
const u8 *node_announcement;
Expand Down
13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

12 changes: 8 additions & 4 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def reconnect_and_verify(l1, l2, alt_addr, alt_port):
assert not any(peer['connected'] for peer in l1.rpc.listpeers()['peers']), "l1 should not have any connected peers"

l1.rpc.connect(l2.info['id'], alt_addr, alt_port)
assert only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'] == True
assert only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'] is True

# Verify the connection using the new address
connected_peer = l1.rpc.getpeer(l2.info['id'])
Expand Down Expand Up @@ -171,8 +171,13 @@ def test_whitelist(l2, alt_addr, alt_port):
# Setup a third node
l3 = node_factory.get_node()

# Attempt to connect to l2 using alt_addr:alt_port without receiving it from l2
l3.rpc.connect(l2.info['id'], alt_addr, alt_port)
try:
# Attempt to connect to l2 using alt_addr:alt_port without receiving it from l2
l3.rpc.connect(l2.info['id'], alt_addr, alt_port)
except RpcError as e:
print(f"RPC Error: {e}")
assert e.error['code'] == 402, f"Unexpected error code: {e.error['code']}"
assert "disconnected during connection" in e.error['message'], f"Unexpected error message: {e.error['message']}"

# Verify the expected log message
l2.daemon.wait_for_log(f"Connection attempt from address {alt_addr}:{alt_port} which is not in the whitelist. The peer has not received an alternative address from me. Closing connection.")
Expand All @@ -181,7 +186,6 @@ def test_whitelist(l2, alt_addr, alt_port):
connected_peers = l2.rpc.listpeers()['peers']
assert not any(peer['id'] == l3.info['id'] and peer['connected'] for peer in connected_peers), "l3 should not be connected to l2"


alt_addr = '127.0.0.21'

# Test case 1: Standard alternate address
Expand Down
4 changes: 2 additions & 2 deletions wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,8 +1066,8 @@ struct wireaddr_internal *wallet_get_alt_addr(struct wallet *w,
struct db_stmt *stmt;
struct wireaddr_internal *alt_addrs;
bool transaction_started = false;
const char *addr_column = use_our_alt_addr
? "our_alt_addr"
const char *addr_column = use_our_alt_addr
? "our_alt_addr"
: "peer_alt_addr";

if (!db_in_transaction(w->db)) {
Expand Down

0 comments on commit cb6d82d

Please sign in to comment.