remove lnworker.get_channel_by_scid (redundant)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user