lnaddr: make payment_secret field mandatory, in both directions
we now require payment_secret both for sending and for receiving (previously was optional for both) see https://github.com/lightning/bolts/pull/898 https://github.com/ACINQ/eclair/pull/1810 https://github.com/ElementsProject/lightning/pull/4646 note: payment_secret depends on var_onion_optin, so that becomes mandatory as well, however this commit does not yet remove the ability of creating legacy onions
This commit is contained in:
@@ -232,7 +232,15 @@ def create_trampoline_route(
|
||||
return route
|
||||
|
||||
|
||||
def create_trampoline_onion(*, route, amount_msat, final_cltv, total_msat, payment_hash, payment_secret):
|
||||
def create_trampoline_onion(
|
||||
*,
|
||||
route,
|
||||
amount_msat,
|
||||
final_cltv,
|
||||
total_msat: int,
|
||||
payment_hash: bytes,
|
||||
payment_secret: bytes,
|
||||
):
|
||||
# all edges are trampoline
|
||||
hops_data, amount_msat, cltv = calc_hops_data_for_payment(
|
||||
route,
|
||||
@@ -281,8 +289,8 @@ def create_trampoline_route_and_onion(
|
||||
my_pubkey: bytes,
|
||||
node_id,
|
||||
r_tags,
|
||||
payment_hash,
|
||||
payment_secret,
|
||||
payment_hash: bytes,
|
||||
payment_secret: bytes,
|
||||
local_height: int,
|
||||
trampoline_fee_level: int,
|
||||
use_two_trampolines: bool,
|
||||
|
||||
Reference in New Issue
Block a user