mirror of
https://github.com/ACINQ/eclair.git
synced 2024-11-20 02:27:32 +01:00
Switched commitment log level to info (minor) (#700)
* switched commitment log level to info * reduced test log level * attempt at fixing tests timeout
This commit is contained in:
parent
b60183628f
commit
8645038943
@ -364,7 +364,7 @@ object Commitments {
|
||||
val htlcSigs = sortedHtlcTxs.map(keyManager.sign(_, keyManager.htlcPoint(localParams.channelKeyPath), remoteNextPerCommitmentPoint))
|
||||
|
||||
// NB: IN/OUT htlcs are inverted because this is the remote commit
|
||||
log.debug(s"built remote commit number=${remoteCommit.index + 1} htlc_in={} htlc_out={} feeratePerKw=${spec.feeratePerKw} txid=${remoteCommitTx.tx.txid} tx={}", spec.htlcs.filter(_.direction == OUT).size, spec.htlcs.filter(_.direction == IN).size, remoteCommitTx.tx)
|
||||
log.info(s"built remote commit number=${remoteCommit.index + 1} htlc_in={} htlc_out={} feeratePerKw=${spec.feeratePerKw} txid=${remoteCommitTx.tx.txid} tx={}", spec.htlcs.filter(_.direction == OUT).map(_.add.id).mkString(","), spec.htlcs.filter(_.direction == IN).map(_.add.id).mkString(","), remoteCommitTx.tx)
|
||||
|
||||
// don't sign if they don't get paid
|
||||
val commitSig = CommitSig(
|
||||
@ -406,7 +406,7 @@ object Commitments {
|
||||
val (localCommitTx, htlcTimeoutTxs, htlcSuccessTxs) = makeLocalTxs(keyManager, localCommit.index + 1, localParams, remoteParams, commitInput, localPerCommitmentPoint, spec)
|
||||
val sig = keyManager.sign(localCommitTx, keyManager.fundingPublicKey(localParams.channelKeyPath))
|
||||
|
||||
log.debug(s"built local commit number=${localCommit.index + 1} htlc_in={} htlc_out={} feeratePerKw=${spec.feeratePerKw} txid=${localCommitTx.tx.txid} tx={}", spec.htlcs.filter(_.direction == IN).size, spec.htlcs.filter(_.direction == OUT).size, localCommitTx.tx)
|
||||
log.info(s"built local commit number=${localCommit.index + 1} htlc_in={} htlc_out={} feeratePerKw=${spec.feeratePerKw} txid=${localCommitTx.tx.txid} tx={}", spec.htlcs.filter(_.direction == IN).map(_.add.id).mkString(","), spec.htlcs.filter(_.direction == OUT).map(_.add.id).mkString(","), localCommitTx.tx)
|
||||
|
||||
// TODO: should we have optional sig? (original comment: this tx will NOT be signed if our output is empty)
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
|
||||
<!--logger name="fr.acinq.eclair.channel" level="DEBUG"/-->
|
||||
<logger name="fr.acinq.eclair.router" level="WARN"/>
|
||||
<logger name="fr.acinq.eclair.channel" level="WARN"/>
|
||||
<logger name="fr.acinq.eclair.Diagnostics" level="OFF"/>
|
||||
|
||||
<root level="INFO">
|
||||
|
@ -36,7 +36,7 @@ import fr.acinq.eclair.io.Peer.{Disconnect, PeerRoutingMessage}
|
||||
import fr.acinq.eclair.io.{NodeURI, Peer}
|
||||
import fr.acinq.eclair.payment.PaymentLifecycle.{State => _, _}
|
||||
import fr.acinq.eclair.payment.{LocalPaymentHandler, PaymentRequest}
|
||||
import fr.acinq.eclair.router.{Announcements, AnnouncementsBatchValidationSpec}
|
||||
import fr.acinq.eclair.router.{Announcements, AnnouncementsBatchValidationSpec, ChannelDesc}
|
||||
import fr.acinq.eclair.transactions.Transactions
|
||||
import fr.acinq.eclair.transactions.Transactions.{HtlcSuccessTx, HtlcTimeoutTx}
|
||||
import fr.acinq.eclair.wire._
|
||||
@ -257,19 +257,15 @@ class IntegrationSpec extends TestKit(ActorSystem("test")) with BitcoindService
|
||||
// A will receive an error from B that include the updated channel update, then will retry the payment
|
||||
sender.expectMsgType[PaymentSucceeded](5 seconds)
|
||||
// in the meantime, the router will have updated its state
|
||||
awaitCond({
|
||||
sender.send(nodes("A").router, 'updates)
|
||||
sender.expectMsgType[Iterable[ChannelUpdate]].toSeq.contains(channelUpdateBC)
|
||||
}, max = 20 seconds, interval = 1 second)
|
||||
sender.send(nodes("A").router, 'updatesMap)
|
||||
assert(sender.expectMsgType[Map[ChannelDesc, ChannelUpdate]].apply(ChannelDesc(channelUpdateBC.shortChannelId, nodes("B").nodeParams.nodeId, nodes("C").nodeParams.nodeId)) === channelUpdateBC)
|
||||
// we then put everything back like before by asking B to refresh its channel update (this will override the one we created)
|
||||
sender.send(nodes("B").register, ForwardShortId(shortIdBC, TickRefreshChannelUpdate))
|
||||
awaitCond({
|
||||
sender.send(nodes("A").router, 'updates)
|
||||
val u = sender.expectMsgType[Iterable[ChannelUpdate]].toSeq
|
||||
.find(u => u.shortChannelId == channelUpdateBC.shortChannelId && u.flags == channelUpdateBC.flags)
|
||||
.get
|
||||
sender.send(nodes("A").router, 'updatesMap)
|
||||
val u = sender.expectMsgType[Map[ChannelDesc, ChannelUpdate]].apply(ChannelDesc(channelUpdateBC.shortChannelId, nodes("B").nodeParams.nodeId, nodes("C").nodeParams.nodeId))
|
||||
u.cltvExpiryDelta == 144
|
||||
}, max = 20 seconds, interval = 1 second)
|
||||
}, max = 30 seconds, interval = 1 second)
|
||||
}
|
||||
|
||||
test("send an HTLC A->D with an amount greater than capacity of B-C") {
|
||||
|
Loading…
Reference in New Issue
Block a user