Skip to content

Commit

Permalink
bypass pending relay db calls [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pm47 committed May 17, 2021
1 parent 91cc62d commit 2ee43ad
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

package fr.acinq.eclair.db

import java.io.Closeable

import akka.actor.{ActorContext, ActorRef}
import akka.actor.ActorRef
import akka.event.LoggingAdapter
import fr.acinq.bitcoin.ByteVector32
import fr.acinq.eclair.channel._
import fr.acinq.eclair.wire.protocol.{UpdateFailHtlc, UpdateFailMalformedHtlc, UpdateFulfillHtlc, UpdateMessage}

import java.io.Closeable

/**
* This database stores CMD_FULFILL_HTLC and CMD_FAIL_HTLC that we have received from downstream
* (either directly via UpdateFulfillHtlc or by extracting the value from the
Expand Down Expand Up @@ -58,7 +58,7 @@ object PendingRelayDb {
// htlc settlement commands don't have replyTo
register ! Register.Forward(ActorRef.noSender, channelId, cmd)
// we store the command in a db (note that this happens *after* forwarding the command to the channel, so we don't add latency)
db.addPendingRelay(channelId, cmd)
//db.addPendingRelay(channelId, cmd)
}

def ackCommand(db: PendingRelayDb, channelId: ByteVector32, cmd: HtlcSettlementCommand): Unit = {
Expand All @@ -77,7 +77,7 @@ object PendingRelayDb {
db.removePendingRelay(u.channelId, u.id)
}

def getPendingFailsAndFulfills(db: PendingRelayDb, channelId: ByteVector32)(implicit log: LoggingAdapter): Seq[HtlcSettlementCommand] = {
def getPendingFailsAndFulfills(db: PendingRelayDb, channelId: ByteVector32)(implicit log: LoggingAdapter): Seq[HtlcSettlementCommand] = {
db.listPendingRelay(channelId)
}
}

0 comments on commit 2ee43ad

Please sign in to comment.