1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-03-12 19:01:39 +01:00

Remove usage of ModifyPimp (#3034)

This breaks the deterministic build, most likely because of the
usage of reflection internally.
This commit is contained in:
Bastien Teinturier 2025-03-11 15:15:18 +01:00 committed by GitHub
parent 57b455c5d8
commit 4df8cd0794
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,6 @@ import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.adapter.{ClassicActorContextOps, actorRefAdapter}
import akka.actor.{Actor, ActorContext, ActorRef, FSM, OneForOneStrategy, PossiblyHarmful, Props, SupervisorStrategy, typed}
import akka.event.Logging.MDC
import com.softwaremill.quicklens.ModifyPimp
import fr.acinq.bitcoin.scalacompat.Crypto.{PrivateKey, PublicKey}
import fr.acinq.bitcoin.scalacompat.{ByteVector32, Satoshi, SatoshiLong, Transaction, TxId}
import fr.acinq.eclair.Logs.LogCategory
@ -2690,7 +2689,19 @@ class Channel(val nodeParams: NodeParams, val wallet: OnChainChannelFunder with
// caution!
log.warning("force-closing with fundingTxIndex reset to {} (concurrent funding transactions: {})", resetFundingTxIndex, data.commitments.active.filter(_.fundingTxIndex > resetFundingTxIndex).map(_.fundingTxId).mkString(", "))
replyTo ! RES_SUCCESS(c, data.channelId)
val resetData = data.modify(_.commitments.active).using(_.filter(_.fundingTxIndex <= resetFundingTxIndex))
val commitments1 = data.commitments.copy(active = data.commitments.active.filter(_.fundingTxIndex <= resetFundingTxIndex))
val resetData = data match {
case data: DATA_WAIT_FOR_FUNDING_CONFIRMED => data.copy(commitments = commitments1)
case data: DATA_WAIT_FOR_CHANNEL_READY => data.copy(commitments = commitments1)
case data: DATA_WAIT_FOR_DUAL_FUNDING_CONFIRMED => data.copy(commitments = commitments1)
case data: DATA_WAIT_FOR_DUAL_FUNDING_READY => data.copy(commitments = commitments1)
case data: DATA_NORMAL => data.copy(commitments = commitments1)
case data: DATA_SHUTDOWN => data.copy(commitments = commitments1)
case data: DATA_NEGOTIATING => data.copy(commitments = commitments1)
case data: DATA_NEGOTIATING_SIMPLE => data.copy(commitments = commitments1)
case data: DATA_CLOSING => data.copy(commitments = commitments1)
case data: DATA_WAIT_FOR_REMOTE_PUBLISH_FUTURE_COMMITMENT => data.copy(commitments = commitments1)
}
handleLocalError(failure, resetData, Some(c))
} else {
handleCommandError(CommandUnavailableInThisState(d.channelId, "forcecloseresetfundingindex", stateName), c)