You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`to_local` output or remote output on remote commitment transaction
needs a channel keys to be spent. As per-channel keys are derived from
KeysManager seed and per-channel secrets those must be backed up by
any descriptor bookmarking for latter spend. We test that generating
a new KeysManager loaded with such backed-up seed/per-channel secrets
return the correct keys for spending a `to_local` output.
// This test is a copy of test_dynamic_spendable_outputs_local_htlc_timeout_tx, with
5286
+
// a key manager rotation to test that key_derivation_params returned in DynamicOutputP2WSH
5287
+
// let us re-derive the channel key set to then derive a delayed_payment_key.
5288
+
5289
+
let chanmon_cfgs = create_chanmon_cfgs(2);
5290
+
5291
+
// We manually create the node configuration to backup the seed.
5292
+
letmut rng = thread_rng();
5293
+
letmut seed = [0;32];
5294
+
rng.fill_bytes(&mut seed);
5295
+
let keys_manager = test_utils::TestKeysInterface::new(&seed,Network::Testnet);
5296
+
let chan_monitor = test_utils::TestChannelMonitor::new(&chanmon_cfgs[0].chain_monitor,&chanmon_cfgs[0].tx_broadcaster,&chanmon_cfgs[0].logger,&chanmon_cfgs[0].fee_estimator);
5297
+
let node = NodeCfg{chain_monitor:&chanmon_cfgs[0].chain_monitor,logger:&chanmon_cfgs[0].logger,tx_broadcaster:&chanmon_cfgs[0].tx_broadcaster,fee_estimator:&chanmon_cfgs[0].fee_estimator, chan_monitor, keys_manager,node_seed: seed };
0 commit comments