text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|> = (BigInt(underlying >>> 1) << 1) + (underlying & 1) override def toString: String = UnsignedLongs.toString(underlying, 10) } object UInt64 { val MaxValue = UInt64(hex"0xffffffffffffffff") def apply(bin: ByteVector): UInt64 = UInt64(bin.toLong(signed = false)) object Conversions { impli...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2024 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>ent" timers.startTimerAtFixedRate(dummyTimer, SendDummyEvent, 100 milliseconds) Behaviors.receiveMessagePartial { case SendDummyEvent => context.system.eventStream ! EventStream.Publish(DummyEvent) Behaviors.same case DummyEvent => co...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2024 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>val waitForPublishFutureCommitment = "waitForPublishFutureCommitment" } /** we can't chart negative amounts in Kamon */ object DiffSigns { val plus = "plus" val minus = "minus" } object UtxoStatuses { val Confirmed = "confirmed" val Safe = "safe" val Uns...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0<|fim_suffix|>chainEvent { val feeratesPerKw: FeeratesPerKw } object CurrentFeerates { //@formatter:off case class BitcoinCore(feeratesPerKw: FeeratesPerKw) extends CurrentFeerates //@formatter:on } <|fim_middle|...
fim
ACINQ/eclair
scala
/* * Copyright 2020 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>package fr.acinq.eclair.blockchain.bitcoind import akka.actor.typed.Behavior import akka.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler} import fr.acinq.bitcoin.scalacompat.{Scrip<|fim_suffix|> refresher.idle() } } } } private class OnChainAddressRefresher(generator: OnChai...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. <|fim_suffix|>See the License for the specific language governing permissions and * limitations under the License. */ package fr.acinq...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>ence, until one of them works * * @param providers a sequence of providers; they will be tried one after the others until one of them succeeds * @param minFeeratePerByte a configurable minimum value for feerates */ case class FallbackFeeProvider(providers: Seq[FeeProvider], minFeeratePerByte: ...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|> e => val enabled = nodeParams.blockchainWatchdogSources.contains(e.name) if (!enabled) { context.log.warn(s"blockchain watchdog ${e.name} is disabled") } enabled } val headersOverDnsEnabled = socksProxy_opt.isEmpty && nodeParams.blockchainWatchdogSou...
fim
ACINQ/eclair
scala
<|fim_suffix|>i, blockCount: Long)(implicit ec: ExecutionContext): Future[Seq[BlockHeaderAt]] = for { header <- basicRequest.readTimeout(30 seconds).get(baseUri.addPath("blocks", blockCount.toString)) .headers(Socks5ProxyParams.FakeFirefoxHeaders) .response(asJson[JObject]) .send(sb) ...
fim
ACINQ/eclair
scala
<|fim_suffix|>ock: // v2.0.0.bitcoinheaders.net. 604800 IN AAAA 2603:7b12:b27a:c72c:3e67:768f:617f:c81b // v2.0.0.bitcoinheaders.net. 604800 IN AAAA 2600:101:: // v2.0.0.bitcoinheaders.net. 604800 IN AAAA 2601:: // v2.0.0.bitcoinheaders.net. 604800 IN AAAA 2602::3b:a3ed:fd7a // v2.0.0.bitc...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2020 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>ng public key. * It makes it very easy to retrieve funds when channel data has been lost: * - connect to your peer and use option_data_loss_protect to get them to publish their remote commit tx * - retrieve the commit tx from the bitcoin network, extract your funding pubkey from its witness dat...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>tends ChannelException(channelId, s"commit nonce for funding tx $fundingTxId and commitmentNumber=$commitmentNumber is missing") case class InvalidCommitNonce (override val channelId: ByteVector32, fundingTxId: TxId, commitmentNumber: Long) extends ChannelException(channelId, s"commit...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>package fr.acinq.eclair.channel import akka.event.LoggingAdapter import fr.acinq.bitcoin.scalacompat.Crypto.{PrivateKey, PublicKey} import fr.acinq.bitcoin.scalacompat.Musig2.IndividualNonce import fr.acinq.bitcoin.scalacompat.{ByteVector32, ByteVector64, Crypto, OutPoint, Satoshi, SatoshiLong, Transacti...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2020 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|> Register()) // @formatter:off private[channel] case class PeerTerminated(peer: ActorRef, nodeId: PublicKey) private case class ChannelTerminated(channel: ActorRef, channelId: ByteVector32) // @formatter:on // @formatter:off case class Forward[T](replyTo: akka.actor.typed.ActorRef[ForwardFai...
fim
ACINQ/eclair
scala
<|fim_suffix|> // If we were purchasing liquidity, we must keep purchasing liquidity across RBF attempts, otherwise our // peer will simply reject the RBF attempt. cmd.replyTo ! RES_FAILURE(cmd, InvalidRbfMissingLiquidityPurchase(d.channelId, purchase.amount)) stay() case ...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2022 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2022 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>ands, channelId, cmd))(context.system.dispatcher) state } def acking(updates: List[UpdateMessage]): FSM.State[ChannelState, ChannelData] = { log.debug("scheduling acknowledgement of cmds ids={}", updates.collect { case s: HtlcSettlementMessage => s.id }.mkString(",")) context.sy...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2022 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2022 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
/* * Copyright 2022 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_suffix|>ECEIVED = 4096 } private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Response], sessionId: ByteVector32, nodeParams: NodeParams, channelParams: ChannelParams, ...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2023 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|> case None => ParentTxOk(confirmed = false) } }) { case Success(result) => result case Failure(reason) => UnknownFailure(reason) } Behaviors.receiveMessagePartial { case ParentTxOk(confirmed) => txInfo match { case _: SignedHtlcTx | _: ClaimHtlc...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>irmations", parentTxId, cmd.desc) val remainingParentTxs = parentTxs - parentTxId if (remainingParentTxs.isEmpty) { log.info("all parent txs of {} have reached enough confirmations", cmd.desc) notifySender() } else { ...
fim
ACINQ/eclair
scala
<|fim_suffix|>: ByteVector = { val polykey = ChaCha20.encrypt(ByteVector32.Zeroes, key, nonce) val tag = Poly1305.mac(polykey, aad, pad16(aad), ciphertext, pad16(ciphertext), Protocol.writeUInt64(aad.length, ByteOrder.LITTLE_ENDIAN), Protocol.writeUInt64(ciphertext.length, ByteOrder.LITTLE_ENDIAN)) if (tag ...
fim
ACINQ/eclair
scala
<|fim_suffix|>ge: ByteVector): Boolean = this.mac(message) == mac } object Mac32 { def hmac256(key: ByteVector, message: ByteVector): ByteVector32 = { val mac = new HMac(new SHA256Digest()) mac.init(new KeyParameter(key.toArray)) mac.update(message.toArray, 0, message.length.toInt) val output = new...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2020 ACINQ SAS * * Licensed under the Apac<|fim_suffix|> Monitoring { object Metrics { val MessageSize = Kamon.histogram("messages.size", MeasurementUnit.information.bytes) } object Tags { val MessageDirection = "direction" object MessageDirections { val IN = "...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>package fr.acinq.eclair.crypto import fr.acinq.bitcoin.scalacom<|fim_suffix|> Seq(fundingPrivKey.publicKey, remoteFundingPubKey), None, Some(fundingTxId.value)) } /** * @return a random nonce used to sign our peer's commit tx. */ def signingNonce(localFundingPubKey: PublicKey, remoteFundingP...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>de in the specified direction */ def derive(node: Node, direction: Boolean) = direction match { case false => Node(node.value, node.height + 1, Some(node)) case true => Node(Crypto.sha256(flip(node.value, 63 - node.height)), node.height + 1, Some(node)) } def derive(node: Node, directio...
fim
ACINQ/eclair
scala
<|fim_suffix|> def create(sessionKey: PrivateKey, publicKeys: Seq[PublicKey], payloads: Seq[ByteVector]): BlindedRouteDetails = { require(publicKeys.length == payloads.length, "a payload must be provided for each node in the blinded path") var e = sessionKey val (blindedHops, pathKeys) = publicKeys.zi...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|> remote commit tx * - retrieve the commit tx from the bitcoin network, extract your funding pubkey from its witness data * - recompute your channel keys and spend your output * * @param fundingPubKey funding public key * @return a BIP32 path */ def keyPathFromPublicKey(fundingPubKey: P...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2025 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|> * commitment basepoint keys (payment, revocation, htlc, etc.): * 47' / 1' / <commitmentKeyPath> / <1'-5'> * }}} * * Where the commitmentKeyPath is generated by hashing the funding key at index 0. * * @param seed seed from which the channel funding keys will be derived. */ case class LocalChan...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2020 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
/* * Copyright 2023 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_prefix|>package fr.acinq.eclair.crypto.keymanager import fr.acinq.bitcoin.scalacompat.Crypto.{PrivateKey, PublicKey} import fr.acinq.bitcoin.scalacompat.{ByteVector32, ByteVector64, <|fim_suffix|>ature */ def signDigest(digest: ByteVector32, privateKey: PrivateKey = nodeKey.privateKey): (ByteVector64, Int) ...
fim
ACINQ/eclair
scala
<|fim_suffix|>et such as Electrum */ def masterPubKey(account: Long, addressType: AddressType): String /** * @param keyPath BIP32 path * @return the (public key, address) pair for this BIP32 path starting from the master key */ def derivePublicKey(keyPath: KeyPath): (PublicKey, String) def deriveP...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2021 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_suffix|> given remote node as fee credit. */ def getFeeCredit(nodeId: PublicKey): MilliSatoshi /** Remove fee credit for the given remote node and return the remaining fee credit. */ def removeFeeCredit(nodeId: PublicKey, amountUsed: MilliSatoshi): MilliSatoshi } <|fim_prefix|>/* * Copyright 2024 ACINQ S...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2020 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except <|fim_suffix|>d * limitations under the License. */ package fr.acinq.eclair.db import fr.acinq.eclair.KamonExt import kamon.Kamon import kamon.metric.Metric object ...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. <|fim_suffix|>: SortedMap[RealShortChannelId, PublicChannel] } <|fim_middle|> * You may obtain a copy of the License at * * http:/...
fim
ACINQ/eclair
scala
<|fim_suffix|> distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package fr.acinq.eclair.db import fr.acinq.bitcoin.s...
fim
ACINQ/eclair
scala
/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyrig<|fim_suffix|>NTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package fr.acinq.eclair.db import akka.actor.typed.Behavior import akka.actor.typed.scaladsl.Behaviors impor...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licens<|fim_suffix|> * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOU...
fim
ACINQ/eclair
scala
<|fim_suffix|>ansaction confirms, we can remove the information about old HTLCs that was * stored in the DB to punish revoked commitments. We potentially have millions of rows to delete per channel, and there * is no rush to remove them. We don't want this to negatively impact active channels, so this actor deletes t...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>L, remote_mining_fee_sat BIGINT NOT NULL, feerate_sat_per_kw BIGINT NOT NULL, is_buying_liquidity BOOLEAN NOT NULL, liquidity_amount_sat BIGINT NOT NULL, liquidity_mining_fee_sat BIGINT NOT NULL, liquidity_service_fee_sat BIGINT NOT NULL, input_count BIGINT NOT NULL, output_count BIGINT NOT NULL, tx_type ...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>remaining_fees_msat").msat ) ) (remoteNodeId, paymentHash, pending) }.groupBy { case (remoteNodeId, _, _) => remoteNodeId }.map { case (remoteNodeId, payments) => val paymentsMap = payments.map { case (_, paymentHash, pending)...
fim
ACINQ/eclair
scala
/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2025 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>rage(nodeId: PublicKey): Option[ByteVector] = withMetrics("peers/get-storage", DbBackends.Postgres) { withLock { pg => using(pg.prepareStatement("SELECT data FROM local.peer_storage WHERE node_id = ?")) { statement => statement.setString(1, nodeId.value.toHex) statement.executeQu...
fim
ACINQ/eclair
scala
<|fim_suffix|>ME found, version=$unknownVersion") } setVersion(statement, DB_NAME, CURRENT_VERSION) } } override def addSettlementCommand(channelId: ByteVector32, cmd: HtlcSettlementCommand): Unit = withMetrics("pending-relay/add", DbBackends.Postgres) { withLock { pg => using(pg.prepareS...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>CREATE INDEX metrics_timestamp_idx ON path_finding_metrics(timestamp)") statement.executeUpdate("CREATE INDEX metrics_mpp_idx ON path_finding_metrics(is_mpp)") statement.executeUpdate("CREATE INDEX metrics_name_idx ON path_finding_metrics(experiment_name)") statement.executeUpdate(...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>ity/get-on-the-fly-funding-preimage", DbBackends.Sqlite) { using(sqlite.prepareStatement("SELECT preimage FROM on_the_fly_funding_preimages WHERE payment_hash = ?")) { statement => statement.setBytes(1, paymentHash.toArray) statement.executeQuery().map { rs => rs.getByteVector32("preimage"...
fim
ACINQ/eclair
scala
<|fim_suffix|>an invalid channel update (e.g. missing htlc_maximum_msat). statement.executeQuery("SELECT short_channel_id, channel_update_1, channel_update_2 FROM channels").map(rs => { val shortChannelId = rs.getLong("short_channel_id") val validChannelUpdate1 = rs.getBitVectorOpt("channel_...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2025 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:/<|fim_suffix|>ROM peer_storage WHERE node_id = ?")) { statement => state...
fim
ACINQ/eclair
scala