Update Android branch#746
Merged
Merged
Conversation
Fixed regression caused by 2c1811d: we now don't force sending a channel_update at the same time with channel_announcement. This greatly simplifies the rebroadcast logic, and is what caused the integration test to fail. Added proper test on Peer, testing the actor, not only static methods.
* Router: reset sync state on reconnection When we're reconnected to a peer we will start a new sync process and should reset our sync state with that peer.
If we don't have the origin, it means that we already have forwarded the fulfill so that's not a big deal. This can happen if they send a signature containing the fulfill, then fail the channel before we have time to sign it.
* Fix handling of born again channels When we receive a recent update for a channel that we had marked as stale we must send a query to the underlying transport, not the origin of the update (which would send the query back to the router)
This is a simple optimisation, we don't have to keep all `update_fee`, just the last one. cf BOLT 2: > An update_fee message is sent by the node which is paying the Bitcoin fee. Like any update, it's first committed to the receiver's commitment transaction and then (once acknowledged) committed to the sender's. Unlike an HTLC, update_fee is never closed but simply replaced.
Bitcoind 0.16.0 is no longer available
Bitcoin core returns an error `missing inputs (code: -25)` if the tx that we want to publish has already been published and its output have been spent. When we receive this error, we try to get the tx, in order to know if it is in the blockchain, or if its inputs were spent by another tx. Note: If the outputs of the tx were still unspent, bitcoin core would return "transaction already in block chain (code: -27)" and this is already handled.
This fixes #695, and also adds the channel point in the default channel output. ```bash $ ./eclair-cli channel 00fd4d56d94af93765561bb6cb081f519b9627d3f455eba3215a7846a1af0e46 { "nodeId": "0232e20e7b68b9b673fb25f48322b151a93186bffe4550045040673797ceca43cf", "shortChannelId": "845230006070001", "channelId": "00fd4d56d94af93765561bb6cb081f519b9627d3f455eba3215a7846a1af0e46", "state": "NORMAL", "balanceSat": 9858759, "capacitySat": 10000000, "channelPoint": "470eafa146785a21a3eb55f4d327969b511f08cbb61b566537f94ad9564dfd00:1" } ```
Previously it was only possible to update relay fee in NORMAL state, which is not very convenient because most of the time there are always some channels in OFFLINE state. This works like the NORMAL case, except that the new `channel_update` won't be broadcast immediately. It will be sent out next time the channel goes back to NORMAL, in the same `channel_update` that sets the `enable` flag to true. Also added a default handler that properly rejects the CMD_UPDATE_RELAY_FEE command in all other states.
* Logging: use a rolling file appender Use one file per day, keep 90 days of logs with a total maximum size capped at 5 Gb * Router: log routing broadcast in debug level only
Bitcoind returns version as MMmmrr (major, minor, revision), use an int representation and compare it to our minimum version target.
* updated to scalatest 3.0.5 * use scalatest runner instead of junit Output is far more readable, and makes console (incl. travis) reports actually usable. Turned off test logs as error reporting is enough to figure out what happens. The only downside is that we can't use junit's categories to group tests, like we did for docker related tests. We could use nested suites, but that seems to be overkill so I just removed the categories. Users will only have the possibility to either skip/run all tests. * update scala-maven-plugin to 3.4.2 NB: This requires maven 3.5.4, which means that we currently need to manually install maven on travis. Also updated Docker java version to 8u181 (8u171 for compiling).
* Add instructions for Bitcoin Core 0.17.0 [ci skip] Bitcoin Core 0.17.0 deprecates the `signrawtransaction` RPC call, which will be removed in version 0.18.0, you need to enable this call if you want your eclair node to use a 0.1.70 node. * README: add an example of how to use the new bitcoin.conf sections [ci skip]
We persist htlc data in order to be able to claim htlc outputs in case a revoked tx is published by our counterparty, so only htlcs above remote's `dust_limit` matter. Removed the TODO because we need data to be indexed by commit number so it is ok to write the same htlc data for every commitment it is included in.
* Add `htlcMaximumMsat` field to `ChannelUpdate` message * added compatibility test with c-lightning
This fixes #651.
This fixes #735.
sstone
requested changes
Oct 25, 2018
| feeBaseMsat = rs.getLong("fee_base_msat"), | ||
| feeProportionalMillionths = rs.getLong("fee_proportional_millionths")) | ||
| feeProportionalMillionths = rs.getLong("fee_proportional_millionths"), | ||
| htlcMaximumMsat = Option(rs.getLong("htlc_maximum_msat"))) |
Member
There was a problem hiding this comment.
The problem is that rs.getLong will return 0 is the column contains a NULL value (because it returns a long that cannot be NULL and not a Long object), we should then call rs.wasNull().
For example we could use:
def getNullableLong(label: String) : Option[Long] = {
val result = rs.getLong(label)
if (rs.wasNull()) None else Some(result)
}
sstone
approved these changes
Oct 25, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's a bit tricky because there is a database format change, which creates a difference with master.This was reverted with 0bb8054, instead we will just reset the network db at the app level.