Commit Graph

6494 Commits

Author SHA1 Message Date
Conner Fromknecht
325d77c431
chancloser+cnct: disable channel before closing 2019-03-12 17:34:28 -07:00
Wilmer Paulino
3371c5fab0
Merge pull request #2680 from grunch/passwd-length-validation-on-create-wallet
Add password length validation condition on create wallet cli
2019-03-12 12:12:54 -07:00
chokoboko
69d3c47d22 multi: inspect missed errors in scoped if statements 2019-03-11 13:23:21 -07:00
Olaoluwa Osuntokun
cfb5e249b9
Merge pull request #2749 from Roasbeef/bork-force-close
lnwallet: within ForceClose, mark the channel as borked, prevent mutations for borked channels
2019-03-10 15:21:09 -07:00
Olaoluwa Osuntokun
33ad645f8c
lnwallet: update TestChanSyncFailure to pass with new borked update restriction
In this commit, we update the `TestChanSyncFailure` method to pass given
the new behavior around updating borked channel states. In order to do
this, we add a new method to allow the test to clear an existing channel
state. This method may be of independent use in other areas in the
codebase in the future as well.
2019-03-08 19:15:10 -08:00
Olaoluwa Osuntokun
bc72691806
contractcourt: mark channel as borked before removing the link
In this commit, we ensure that we mark the channel as borked before we
remove the link during the force close process. This ensures that if the
peer reconnects right after we remove the link, then it won't be loaded
into memory in `loadActiveChannels`. We'll now:

  * mark the channel as borked
  * remove the link
  * read the channel state from disk
  * force close

This ensures that the link (if it's active) is able to commit any
pending changes to disk before we read out the channel to force close.
2019-03-08 19:15:08 -08:00
Olaoluwa Osuntokun
dac35c46f3
lnwallet: properly examine and check error from AppendRemoteCommitChain 2019-03-08 19:15:07 -08:00
Olaoluwa Osuntokun
49c38ed56d
lnwallet: update line wrapping to project style where needed 2019-03-08 19:15:06 -08:00
Olaoluwa Osuntokun
032eacb796
channeldb: prevent mutating on-disk commitment state if channel is borked 2019-03-08 19:15:04 -08:00
Olaoluwa Osuntokun
b409e5dfc4 lnwallet: add new TestForceCloseBorkedState test
In this commit, we add a new test: `TestForceCloseBorkedState`. This
ensures that it isn't possible to update the channel state once a
channel has been marked as borked. This assumes that all calls to
`ForceClose` will also mark the channel as borked. This isn't the case
yet, so this test fails as is.
2019-03-08 18:56:42 -08:00
Olaoluwa Osuntokun
3895a4f276
Merge pull request #2745 from cfromknecht/make-install-btcd
Makefile: actually install btcd w/ make btcd
2019-03-08 18:41:18 -08:00
Wilmer Paulino
9d443a9e12
Merge pull request #2746 from joostjager/sendpayment-arg
lncli: fix command line argument parsing for sendpayment
2019-03-08 11:54:21 -08:00
Joost Jager
5b6fdbeb6f
lncli: fix command line argument parsing for sendpayment
This commit fixes a bug that caused the payment hash to be (re)parsed as
an int representing the final cltv delta.
2019-03-08 10:42:18 +01:00
Conner Fromknecht
e0886ff1f5
Merge pull request #2739 from wpaulino/make-flake-unit-fix
Makefile: fix unit test flakehunter when running on specific package
2019-03-07 20:38:14 -08:00
Conner Fromknecht
29fe6e61e2
Makefile: actually install btcd w/ make btcd 2019-03-07 17:56:37 -08:00
Wilmer Paulino
b66f97c23a
Makefile: fix unit test flakehunter when running on specific package
When using the unit test flakehunter and specifying a package, after the
first successful run, all of the tests would be run, rather than just
the ones within the specified package.
2019-03-06 18:01:07 -08:00
Johan T. Halseth
cee18892b5
Merge pull request #2565 from joostjager/sendpayment-refactor
routing: sendPayment broken down into multiple functions
2019-03-06 10:20:20 +01:00
Olaoluwa Osuntokun
c853555d1b
Merge pull request #2690 from cfromknecht/hwsc-fndg-priority-queue
peer: deprioritize gossip traffic
2019-03-05 21:08:26 -08:00
Conner Fromknecht
935ea7d450
server: broadcast using SendMessageLazy, remove unused sendPeerMessages 2019-03-05 17:09:14 -08:00
Conner Fromknecht
b50fd33915
server: remove unused SendToPeer method 2019-03-05 17:09:01 -08:00
Conner Fromknecht
0ae06c8189
discovery+server: send lazy gossip msgs 2019-03-05 17:08:48 -08:00
Conner Fromknecht
2e5bc783f7
peer: preallocate errchans opt 2019-03-05 17:08:35 -08:00
Conner Fromknecht
f39edd8000
peer: add SendMessageLazy 2019-03-05 17:08:22 -08:00
Conner Fromknecht
660bbaf646
peer: add message reordering based on priority 2019-03-05 17:08:05 -08:00
Wilmer Paulino
63273e195e
Merge pull request #2661 from Roasbeef/last-unused-addr
lnwallet+lnrpc: add ability to fetch the last unused wallet addr
2019-03-05 16:53:43 -08:00
Francisco Calderón
9e920f12c9
Add password length validation on create CLI
In this commit we add this validation importing
the walletunlocker.ValidatePassword function on
create wallet command.
2019-03-05 20:58:46 -03:00
Olaoluwa Osuntokun
65cdb1294e
rpc: recognize the new unused prefix address types 2019-03-05 15:35:28 -08:00
Olaoluwa Osuntokun
8c1181af3b
lnwallet: add LastUnusedAddress to WalletController interface
In this commit, we add a new `LastUnusedAddress` method to the
`WalletController` interface. Callers can use this new method to graph
the last unused address, which can be useful for UIs that want to
refresh the address, but not cause nearly unbounded address generation.

The implementation for `btcwallet` uses the existing `CurrentAddress`
method. We've also added a new integration tests to exercise the new
functionality.
2019-03-05 15:35:24 -08:00
Olaoluwa Osuntokun
7703567b0b lnrpc: add new unused address types for NewAddressRequest
In this commit, we add two new address types to `NewAddressRequest`.
These address types will allow the caller to retrieve the last _unused_
address, rather than always rotating to the next address in the
keychain.
2019-03-05 15:34:56 -08:00
Olaoluwa Osuntokun
3be894bc28
Merge pull request #2702 from MDrollette/inactive-overflow
rpcserver: prevent overflow in channel count
2019-03-05 14:56:51 -08:00
Olaoluwa Osuntokun
8b1321d29f
Merge pull request #2732 from cfromknecht/revert-write-timeout-reduction
Revert "peer: reduce write timeout to 10s"
2019-03-05 14:33:18 -08:00
Wilmer Paulino
3e11d72549
Merge pull request #2713 from halseth/listchannels-debug-log
[trivial] rpcserver: make listchannels debug log
2019-03-05 10:25:27 -08:00
Conner Fromknecht
6f1ccf14e9
Revert "peer: reduce write timeout to 10s"
This reverts commit db2c104111c3c12e1651120fe5a51ce03dad8c58.
2019-03-04 13:55:09 -08:00
Matt Drollette
1664617874 rpcserver: prevent overflow in channel count 2019-03-01 13:06:27 -06:00
Olaoluwa Osuntokun
2a652455aa
Merge pull request #2437 from valentinewallace/max-htlc-routing
Consider max HTLC during pathfinding.
2019-03-01 13:55:38 -03:00
Valentine Wallace
648adaea69 routing/pathfind: ensure max htlc is considered during path finding
In this commit, we update the path finding logic to
ignore a channel if the HTLC value (including the fees
at the point) exceeds the max HTLC value (if set) of the
link.
2019-03-01 08:05:27 -08:00
Valentine Wallace
348a66ed13 routing: update test edge policy fields to include max htlc + new flags
Since the MaxHTLC field was recently added to the ChannelEdgePolicy struct,
and the Flags field was broken into ChannelFlags and MessageFlags, the
test edge policies should be updated accordingly.
2019-03-01 08:05:27 -08:00
Olaoluwa Osuntokun
a2dafdef37
Merge pull request #2711 from BrownBurger/installation-bip-links
docs/INSTALL.md: fix links to BIPs
2019-03-01 13:00:50 -03:00
Olaoluwa Osuntokun
2d87a77cdd
Merge pull request #2703 from sanket1729/master
Change network from simtest to testnet for connection to testnet faucet
2019-03-01 12:58:24 -03:00
Olaoluwa Osuntokun
475103d8fd
Merge pull request #2707 from joostjager/commit-resolver-fix
cnct: fix error returning bug
2019-02-28 12:38:19 -03:00
Johan T. Halseth
772930343d
rpcserver: make listchannels debug log 2019-02-27 12:38:54 -03:00
Thomas Braunberger
fab742141f fix links to BIP 157 and 158 2019-02-27 10:01:34 +01:00
Joost Jager
f23fdf95e7
cnct: fix error returning bug
The wrong error variable was returned, causing a resolution failure to
be interpreted by the channel arbitrator as a success.
2019-02-26 12:56:21 -03:00
Sanket Kanjalkar
c7884d1c5a
Change simtest to testnet for connection to testnet faucet
Change simtest to testnet for connection to testnet faucet
2019-02-25 22:12:33 -06:00
Olaoluwa Osuntokun
a6cf6f4237
lnwallet+peer: remove unnecessary MaxPendingAmount method
We don't need this method, as we can directly access it from the peer
via public fields with its current usage.
2019-02-25 12:51:31 -03:00
Olaoluwa Osuntokun
5d1eaaffa4
lnrpc: rename MaxHtlc to MaxHtlcMsat in lnrpc.RoutingPolicy
In this commit, we rename the new `MaxHtlc` field to `MaxHtlcMsat`. We
do this in order to adhere to the new practice to suffix each amount
related field with their proper unit.
2019-02-25 12:49:47 -03:00
Olaoluwa Osuntokun
b13d8cd261
Merge pull request #2434 from valentinewallace/fwding-policy-max-htlc
Set max HTLC in forwarding policies.
2019-02-25 12:43:15 -03:00
Olaoluwa Osuntokun
a6ba965bc4
Merge pull request #2474 from cfromknecht/read-and-write-pools
lnpeer+brontide: reduce memory footprint using read/write pools for message encode/decode
2019-02-24 16:39:32 -03:00
Olaoluwa Osuntokun
f95a71fdc9
build: bump to psuedo version 0.5.2-99-beta 2019-02-22 15:31:07 -08:00
Johan T. Halseth
b93b4f2974
Merge pull request #2672 from Gfloresechaiz/Gfloresechaiz-patch-1
INSTALL.md : bump to go.1.11.5 on Linux
2019-02-22 12:56:27 +01:00