1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-22 06:21:42 +01:00

interactive-tx: disable change check for splice rbf

This commit is contained in:
pm47 2025-01-08 18:53:19 +01:00
parent b2a7294d0d
commit de23616046
No known key found for this signature in database
GPG key ID: E434ED292E85643A

View file

@ -486,7 +486,7 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
case fundingContributions: InteractiveTxFunder.FundingContributions =>
val changeAmount = fundingContributions.outputs.collectFirst { case o: Output.Local.Change => o.amount }.getOrElse(0.sat)
val maxChangeAmount = (fundingParams.localContribution * nodeParams.channelConf.interactiveTxConf.maxChangeRatio).max(0.sat)
if (fundingParams.localOutputs.isEmpty && changeAmount > maxChangeAmount) {
if (!purpose.isInstanceOf[SpliceTxRbf] && fundingParams.localOutputs.isEmpty && changeAmount > maxChangeAmount) {
log.warn("invalid interactive tx: change amount is too large (max={}, actual={})", maxChangeAmount, changeAmount)
replyTo ! LocalFailure(ChannelFundingError(fundingParams.channelId))
unlockAndStop(fundingContributions.inputs.map(_.outPoint).toSet)