2018-03-21 16:29:42 +01:00
|
|
|
<!--
|
|
|
|
~ Copyright 2018 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 writing, software
|
|
|
|
~ 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.
|
|
|
|
-->
|
|
|
|
|
2015-08-19 13:57:05 +02:00
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
|
2015-08-19 14:05:14 +02:00
|
|
|
<groupId>fr.acinq.eclair</groupId>
|
2015-08-19 13:57:05 +02:00
|
|
|
<artifactId>eclair_2.11</artifactId>
|
2019-01-18 20:15:04 +01:00
|
|
|
<version>0.2-SNAPSHOT</version>
|
2015-08-19 13:57:05 +02:00
|
|
|
<packaging>pom</packaging>
|
|
|
|
|
|
|
|
<modules>
|
2017-06-06 18:37:34 +02:00
|
|
|
<module>eclair-core</module>
|
2016-08-26 18:31:12 +02:00
|
|
|
<module>eclair-node</module>
|
2017-08-23 19:28:18 +02:00
|
|
|
<module>eclair-node-gui</module>
|
2015-08-19 13:57:05 +02:00
|
|
|
</modules>
|
|
|
|
|
2016-01-21 15:04:42 +01:00
|
|
|
<description>A scala implementation of the Lightning Network</description>
|
|
|
|
<url>https://github.com/ACINQ/eclair</url>
|
2015-08-19 13:57:05 +02:00
|
|
|
<name>${project.artifactId}</name>
|
|
|
|
|
2016-01-21 15:04:42 +01:00
|
|
|
<licenses>
|
|
|
|
<license>
|
|
|
|
<url>https://raw.githubusercontent.com/ACINQ/eclair/master/LICENSE</url>
|
|
|
|
<name>Apache License</name>
|
|
|
|
<distribution>repo</distribution>
|
|
|
|
</license>
|
|
|
|
</licenses>
|
|
|
|
|
|
|
|
<scm>
|
|
|
|
<connection>scm:git:git@github.com:ACINQ/eclair.git</connection>
|
|
|
|
<developerConnection>scm:git:git@github.com:ACINQ/eclair.git</developerConnection>
|
|
|
|
<url>git@github.com:ACINQ/eclair.git</url>
|
|
|
|
</scm>
|
|
|
|
|
|
|
|
<developers>
|
|
|
|
<developer>
|
2017-09-20 15:16:49 +02:00
|
|
|
<id>dpad85</id>
|
2016-01-21 15:04:42 +01:00
|
|
|
</developer>
|
|
|
|
<developer>
|
|
|
|
<id>pm47</id>
|
|
|
|
</developer>
|
2017-09-20 15:16:49 +02:00
|
|
|
<developer>
|
|
|
|
<id>sstone</id>
|
|
|
|
</developer>
|
2016-01-21 15:04:42 +01:00
|
|
|
</developers>
|
|
|
|
|
2015-08-19 13:57:05 +02:00
|
|
|
<properties>
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
2017-02-03 13:55:25 +01:00
|
|
|
<maven.compiler.source>1.8</maven.compiler.source>
|
|
|
|
<maven.compiler.target>1.8</maven.compiler.target>
|
2019-02-21 15:11:44 +01:00
|
|
|
<scala.version>2.11.12</scala.version>
|
2015-08-19 13:57:05 +02:00
|
|
|
<scala.version.short>2.11</scala.version.short>
|
2018-03-26 17:36:33 +02:00
|
|
|
<akka.version>2.4.20</akka.version>
|
2019-01-11 14:59:33 +01:00
|
|
|
<akka.http.version>10.0.11</akka.http.version>
|
2018-10-25 16:45:27 +02:00
|
|
|
<sttp.version>1.3.9</sttp.version>
|
2019-03-25 14:42:06 +01:00
|
|
|
<bitcoinlib.version>0.11</bitcoinlib.version>
|
2018-02-20 14:26:38 +01:00
|
|
|
<guava.version>24.0-android</guava.version>
|
2015-08-19 13:57:05 +02:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<pluginManagement>
|
|
|
|
<plugins>
|
2017-12-03 17:46:41 +01:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
|
|
<version>3.0.2</version>
|
|
|
|
</plugin>
|
2017-03-27 11:14:54 +02:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
|
|
<version>3.0.2</version>
|
|
|
|
</plugin>
|
2017-06-06 18:37:34 +02:00
|
|
|
<plugin>
|
2017-08-23 19:28:18 +02:00
|
|
|
<groupId>com.github.chrisdchristo</groupId>
|
2017-06-06 18:37:34 +02:00
|
|
|
<artifactId>capsule-maven-plugin</artifactId>
|
2017-08-23 19:28:18 +02:00
|
|
|
<version>1.5.1</version>
|
2017-06-06 18:37:34 +02:00
|
|
|
</plugin>
|
2015-08-19 13:57:05 +02:00
|
|
|
</plugins>
|
|
|
|
</pluginManagement>
|
|
|
|
<plugins>
|
2017-06-06 18:37:34 +02:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>versions-maven-plugin</artifactId>
|
|
|
|
<version>2.3</version>
|
|
|
|
</plugin>
|
2017-12-05 17:29:47 +01:00
|
|
|
<plugin>
|
|
|
|
<groupId>pl.project13.maven</groupId>
|
|
|
|
<artifactId>git-commit-id-plugin</artifactId>
|
2017-12-08 16:24:43 +01:00
|
|
|
<version>2.2.3</version>
|
2017-12-05 17:29:47 +01:00
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<goals>
|
|
|
|
<goal>revision</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<failOnNoGitDirectory>false</failOnNoGitDirectory>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2015-08-19 13:57:05 +02:00
|
|
|
<plugin>
|
|
|
|
<groupId>net.alchim31.maven</groupId>
|
|
|
|
<artifactId>scala-maven-plugin</artifactId>
|
2018-10-11 19:01:41 +02:00
|
|
|
<version>3.4.2</version>
|
2017-06-06 18:37:34 +02:00
|
|
|
<configuration>
|
2017-12-03 20:33:22 +01:00
|
|
|
<args combine.children="append">
|
2017-07-17 14:28:07 +02:00
|
|
|
<arg>-deprecation</arg>
|
|
|
|
<arg>-feature</arg>
|
|
|
|
<arg>-language:postfixOps</arg>
|
|
|
|
<arg>-language:implicitConversions</arg>
|
2017-12-03 20:33:22 +01:00
|
|
|
<arg>-Xfatal-warnings</arg>
|
2017-12-22 21:01:40 +01:00
|
|
|
<arg>-unchecked</arg>
|
2018-01-22 17:59:47 +01:00
|
|
|
<arg>-Xmax-classfile-name</arg>
|
|
|
|
<arg>140</arg>
|
2019-02-21 15:11:44 +01:00
|
|
|
<!-- needed to compile Scala code on JDK9+ -->
|
|
|
|
<arg>-nobootcp</arg>
|
2017-07-17 14:28:07 +02:00
|
|
|
</args>
|
2017-06-06 18:37:34 +02:00
|
|
|
<scalaCompatVersion>${scala.version.short}</scalaCompatVersion>
|
|
|
|
</configuration>
|
2015-08-19 13:57:05 +02:00
|
|
|
<executions>
|
|
|
|
<execution>
|
2017-12-03 20:33:22 +01:00
|
|
|
<id>scalac</id>
|
2015-08-19 13:57:05 +02:00
|
|
|
<goals>
|
|
|
|
<goal>compile</goal>
|
|
|
|
<goal>testCompile</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
2016-01-21 15:04:42 +01:00
|
|
|
<execution>
|
2017-12-03 20:33:22 +01:00
|
|
|
<id>scaladoc</id>
|
2016-01-21 15:04:42 +01:00
|
|
|
<goals>
|
|
|
|
<goal>doc-jar</goal>
|
|
|
|
</goals>
|
2017-12-03 20:33:22 +01:00
|
|
|
<configuration>
|
|
|
|
<args>
|
|
|
|
<arg>-no-link-warnings</arg>
|
|
|
|
</args>
|
|
|
|
</configuration>
|
2016-01-21 15:04:42 +01:00
|
|
|
</execution>
|
2015-08-19 13:57:05 +02:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-source-plugin</artifactId>
|
2017-06-06 18:37:34 +02:00
|
|
|
<version>3.0.1</version>
|
2015-08-19 13:57:05 +02:00
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>attach-sources</id>
|
|
|
|
<goals>
|
|
|
|
<goal>jar</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
2017-06-06 18:37:34 +02:00
|
|
|
<version>3.0.0</version>
|
2015-08-19 13:57:05 +02:00
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>add-source</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>add-source</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<sources>
|
|
|
|
<source>src/main/scala</source>
|
|
|
|
</sources>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>add-test-source</id>
|
|
|
|
<phase>generate-test-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>add-test-source</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<sources>
|
|
|
|
<source>src/test/scala</source>
|
|
|
|
</sources>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2018-10-11 19:01:41 +02:00
|
|
|
<!-- disable surefire -->
|
2015-09-08 19:36:57 +02:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
2017-06-06 18:37:34 +02:00
|
|
|
<version>2.20</version>
|
2015-09-08 19:36:57 +02:00
|
|
|
<configuration>
|
2018-10-11 19:01:41 +02:00
|
|
|
<skipTests>true</skipTests>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
<!-- enable scalatest -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.scalatest</groupId>
|
|
|
|
<artifactId>scalatest-maven-plugin</artifactId>
|
|
|
|
<version>2.0.0</version>
|
|
|
|
<configuration>
|
|
|
|
<parallel>false</parallel>
|
|
|
|
<systemProperties>
|
2017-03-16 16:18:52 +01:00
|
|
|
<buildDirectory>${project.build.directory}</buildDirectory>
|
2018-10-11 19:01:41 +02:00
|
|
|
</systemProperties>
|
Better logic for sending `channel_updates` (#888)
* don't spam with channel_updates at startup
Previous logic was very simple but naive:
- every time a channel_update changed we would send it out
- we would always make a new channel_update with the disabled flag set
at startup.
In case our node was simply restarted, this resulted in us re-sending a
channel_update with the disabled flag set, then a second one with the
disabled flag unset a few seconds later, for each public channel.
On top of that, this opened way to a bug: if reconnection is very fast,
then the two successive channel_update will have the same timestamp,
causing the router to not send the second one, which means that the
channel would be considered disabled by the network, and excluded from
payments.
The new logic is as follows:
- when we do NORMAL->NORMAL or NORMAL->OFFLINE or OFFLINE->NORMAL, we
send out the new channel_update if it has changed
- in all other case (e.g. WAIT_FOR_INIT_INTERNAL->OFFLINE) we do nothing
As a side effect, if we were connected to a peer, then we shut down
eclair, then the peer goes down, then we restart eclair: we will make a
new channel_update with the disabled flag set but we won't broadcast it.
If someone tries to make a payment to that node, we will return the
new channel_update with disabled flag set (and maybe the payer will then
broadcast that channel_update). So even in that corner case we are good.
* quick reconnection: bump channel_update timestamp
In case of a disconnection-reconnection, we first generate a
channel_update with disabled bit set, then after we reconnect we
generate a second channel_update with disabled bit not set.
If this happens very quickly, then both channel_updates will have the
same timestamp, and the second one will get ignored by the network.
A simple fix is to bump the second timestamp in this case.
* set channel_update refresh timer at reconnection
We only care about this timer when connected anyway. We also cancel it
when disconnecting.
This has several advantages:
- having a static task resulted in unnecessary refresh if the channel
got disconnected/reconnected in between 2 weeks
- better repartition of the channel_update refresh over time because at
startup all channels were generated at the same time causing all refresh
tasks to be synchronized
- less overhead for the scheduler (because we cancel refresh task for
offline channels (minor, but still)
2019-03-18 14:39:29 +01:00
|
|
|
<argLine>-Xmx1024m</argLine>
|
2015-09-08 19:36:57 +02:00
|
|
|
</configuration>
|
2018-10-11 19:01:41 +02:00
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>test</id>
|
|
|
|
<goals>
|
|
|
|
<goal>test</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
2015-09-08 19:36:57 +02:00
|
|
|
</plugin>
|
2015-08-19 13:57:05 +02:00
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
|
|
|
|
<repositories>
|
|
|
|
<repository>
|
|
|
|
<id>sonatype snapshots</id>
|
|
|
|
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
|
|
|
</repository>
|
|
|
|
</repositories>
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.scala-lang</groupId>
|
|
|
|
<artifactId>scala-library</artifactId>
|
|
|
|
<version>${scala.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.scalatest</groupId>
|
2015-08-19 15:50:41 +02:00
|
|
|
<artifactId>scalatest_${scala.version.short}</artifactId>
|
2018-10-11 19:01:41 +02:00
|
|
|
<version>3.0.5</version>
|
2015-08-19 13:57:05 +02:00
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
</project>
|