reverse swaps: in the CLI, replace 'server_mining_fee' with
'prepayment', which corresponds to the trusted part of the lightning payment. We use 2*sm.mining_fee, where 'mining_fee' is the flat part of the server fee. However, future protocol should probably allow to set a value that does not depend on 'mining_fee'. (note that LND uses a hardcoded amount).
This commit is contained in:
@@ -719,7 +719,7 @@ class QESwapHelper(AuthMixin, QObject, QtEventListener):
|
||||
transport=self.swap_transport,
|
||||
lightning_amount_sat=lightning_amount,
|
||||
expected_onchain_amount_sat=onchain_amount + swap_manager.get_fee_for_txbatcher(),
|
||||
server_mining_fee_sat=self.serverMiningfee.satsInt,
|
||||
prepayment_sat=2 * self.serverMiningfee.satsInt,
|
||||
)
|
||||
try: # swaphelper might be destroyed at this point
|
||||
if txid:
|
||||
|
||||
@@ -338,7 +338,7 @@ class SwapDialog(WindowModalDialog, QtEventListener):
|
||||
transport=transport,
|
||||
lightning_amount_sat=lightning_amount,
|
||||
expected_onchain_amount_sat=onchain_amount + self.swap_manager.get_fee_for_txbatcher(),
|
||||
server_mining_fee_sat=self.last_server_mining_fee_sat,
|
||||
prepayment_sat=2 * self.last_server_mining_fee_sat,
|
||||
)
|
||||
try:
|
||||
# we must not leave the context, so we use run_couroutine_dialog
|
||||
|
||||
Reference in New Issue
Block a user