mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
do not allow channel creation from backup file
This commit is contained in:
parent
9d0a862a43
commit
704c3ae07f
1 changed files with 2 additions and 0 deletions
|
@ -779,6 +779,8 @@ class LNWallet(LNWorker):
|
||||||
def open_channel(self, *, connect_str: str, funding_tx: PartialTransaction,
|
def open_channel(self, *, connect_str: str, funding_tx: PartialTransaction,
|
||||||
funding_sat: int, push_amt_sat: int, password: str = None,
|
funding_sat: int, push_amt_sat: int, password: str = None,
|
||||||
timeout: Optional[int] = 20) -> Tuple[Channel, PartialTransaction]:
|
timeout: Optional[int] = 20) -> Tuple[Channel, PartialTransaction]:
|
||||||
|
if self.wallet.is_lightning_backup():
|
||||||
|
raise BaseException(_('Cannot create channel: this is a backup file'))
|
||||||
if funding_sat > LN_MAX_FUNDING_SAT:
|
if funding_sat > LN_MAX_FUNDING_SAT:
|
||||||
raise Exception(_("Requested channel capacity is over protocol allowed maximum."))
|
raise Exception(_("Requested channel capacity is over protocol allowed maximum."))
|
||||||
coro = self._open_channel_coroutine(connect_str=connect_str, funding_tx=funding_tx, funding_sat=funding_sat,
|
coro = self._open_channel_coroutine(connect_str=connect_str, funding_tx=funding_tx, funding_sat=funding_sat,
|
||||||
|
|
Loading…
Add table
Reference in a new issue