mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
ln: make 'to_self_delay' CSV configurable
needed for tests
This commit is contained in:
parent
fc39295d20
commit
3509343447
3 changed files with 4 additions and 5 deletions
|
@ -40,7 +40,7 @@ from .lnutil import (Outpoint, LocalConfig, RECEIVED, UpdateAddHtlc,
|
|||
LOCAL, REMOTE, HTLCOwner, generate_keypair, LnKeyFamily,
|
||||
ln_compare_features, privkey_to_pubkey, MIN_FINAL_CLTV_EXPIRY_ACCEPTED,
|
||||
LightningPeerConnectionClosed, HandshakeFailed, NotFoundChanAnnouncementForUpdate,
|
||||
RemoteMisbehaving, DEFAULT_TO_SELF_DELAY,
|
||||
RemoteMisbehaving,
|
||||
NBLOCK_OUR_CLTV_EXPIRY_DELTA, format_short_channel_id, ShortChannelID,
|
||||
IncompatibleLightningFeatures, derive_payment_secret_from_payment_preimage,
|
||||
LN_MAX_FUNDING_SAT, calc_fees_for_commitment_tx)
|
||||
|
@ -503,7 +503,7 @@ class Peer(Logger):
|
|||
local_config = LocalConfig.from_seed(
|
||||
channel_seed=channel_seed,
|
||||
static_remotekey=static_remotekey,
|
||||
to_self_delay=DEFAULT_TO_SELF_DELAY,
|
||||
to_self_delay=self.network.config.get('lightning_to_self_delay', 7 * 144),
|
||||
dust_limit_sat=bitcoin.DUST_LIMIT_DEFAULT_SAT_LEGACY,
|
||||
max_htlc_value_in_flight_msat=funding_sat * 1000,
|
||||
max_accepted_htlcs=5,
|
||||
|
|
|
@ -282,8 +282,6 @@ class NotFoundChanAnnouncementForUpdate(Exception): pass
|
|||
class PaymentFailure(UserFacingException): pass
|
||||
|
||||
# TODO make some of these values configurable?
|
||||
DEFAULT_TO_SELF_DELAY = 7 * 144
|
||||
|
||||
REDEEM_AFTER_DOUBLE_SPENT_DELAY = 30
|
||||
|
||||
CHANNEL_OPENING_TIMEOUT = 24*60*60
|
||||
|
|
|
@ -79,9 +79,10 @@ if [[ $1 == "init" ]]; then
|
|||
$agent -o init_lightning
|
||||
$agent setconfig --offline log_to_file True
|
||||
$agent setconfig --offline server 127.0.0.1:51001:t
|
||||
$agent setconfig --offline lightning_to_self_delay 144
|
||||
# alice is funded, bob is listening
|
||||
if [[ $2 == "bob" ]]; then
|
||||
$bob setconfig --offline lightning_listen localhost:9735
|
||||
$bob setconfig --offline lightning_listen localhost:9735
|
||||
else
|
||||
echo "funding $2"
|
||||
$bitcoin_cli sendtoaddress $($agent getunusedaddress -o) 1
|
||||
|
|
Loading…
Add table
Reference in a new issue