1
0

remove lnworker.get_channel_by_scid (redundant)

This commit is contained in:
ThomasV
2023-09-17 11:06:25 +02:00
parent 6cd42faa68
commit 375f96f7fa
2 changed files with 2 additions and 7 deletions

View File

@@ -1282,8 +1282,8 @@ class Commands:
from .lnutil import ShortChannelID
from_scid = ShortChannelID.from_str(from_scid)
dest_scid = ShortChannelID.from_str(dest_scid)
from_channel = wallet.lnworker.get_channel_by_scid(from_scid)
dest_channel = wallet.lnworker.get_channel_by_scid(dest_scid)
from_channel = wallet.lnworker.get_channel_by_short_id(from_scid)
dest_channel = wallet.lnworker.get_channel_by_short_id(dest_scid)
amount_sat = satoshis(amount)
success, log = await wallet.lnworker.rebalance_channels(
from_channel,

View File

@@ -882,11 +882,6 @@ class LNWallet(LNWorker):
def get_channel_by_id(self, channel_id: bytes) -> Optional[Channel]:
return self._channels.get(channel_id, None)
def get_channel_by_scid(self, scid: bytes) -> Optional[Channel]:
for chan in self._channels.values():
if chan.short_channel_id == scid:
return chan
def diagnostic_name(self):
return self.wallet.diagnostic_name()