diff --git a/channel.py b/channel.py index 51d981f..365ca19 100644 --- a/channel.py +++ b/channel.py @@ -8,6 +8,8 @@ def recommend_channels(channels): if channel.outbound_capacity > 1000000: if channel.local_balance > channel.remote_balance: if channel.outbound_capacity > channel.inbound_capacity: - recommended.append(channel) + if channel.local_balance / channel.remote_balance > 0.5: + if channel.local_balance / channel.remote_balance < 2: + recommended.append(channel) return recommended \ No newline at end of file diff --git a/lnd_bot.py b/lnd_bot.py index 691eb41..60f76d4 100644 --- a/lnd_bot.py +++ b/lnd_bot.py @@ -16,5 +16,7 @@ def recommend_channels(): for channel in channels.channels: if channel.remote_balance > 1000000: if channel.local_balance > 1000000: + if channel.local_balance / channel.remote_balance > 0.5: + if channel.local_balance / channel.remote_balance < 2: recommended.append(channel) return recommended diff --git a/nostr_ln_bot.py b/nostr_ln_bot.py index dd047fb..fce210a 100644 --- a/nostr_ln_bot.py +++ b/nostr_ln_bot.py @@ -24,8 +24,10 @@ def recommend_channels(): channels = lnd.list_channels() recommended = [] for channel in channels.channels: - if channel.remote_balance > 1000000: # Example criterion - recommended.append(channel) + if channel.remote_balance > 1000000: + if channel.local_balance / channel.remote_balance > 0.5: + if channel.local_balance / channel.remote_balance < 2: + recommended.append(channel) return recommended def handle_nostr_event(event): diff --git a/setup.py b/setup.py index af3521a..b5270a9 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ name="nostr_ln_bot", version="1.0.0-beta", description="Nostr bot for Lightning Network channel recommendations", - author="22388o", "Rsync25", + author=["22388o", "Rsync25"], url="https://github.com/AreaLayer/nostr-ln-bot-channel", packages=find_packages(), install_requires=[ @@ -22,4 +22,4 @@ "Operating System :: OS Independent", ], python_requires='>=3.7', -) +) \ No newline at end of file