Commit graph

20 commits

Author SHA1 Message Date
Matt Corallo
90b545ffe3 Narrow ChainWatchInterface::install_watch_script 2018-09-08 02:30:28 +00:00
Antoine Riard
4b4d8b6b9e Add test_invalid_channel_announcemnt + test utilities
Fix typo
2018-09-03 17:40:12 -04:00
Antoine Riard
07ac327f8b Implement get_chain_utxo and ChainError in
ChainWatchInterface to Router check on channel_announcement

Needed for BOLT 7
2018-09-03 17:40:12 -04:00
Matt Corallo
11e5975523 Update to rust-secp256k1 v0.11 and rust-bitcoin v0.14 2018-08-23 14:52:43 -04:00
Antoine Riard
0029f04fce Logging interface
Implement error, warn, info, debug and trace macros, internally calling
an instance of Logger, and passing it to every main structures
Build-time or client-side filtering.
Issue #54
2018-08-17 00:01:15 +00:00
Savil Srivastava
ca6b44b8cc replace use of bitcoin::utils::misc::hex_bytes with hex::decode
as requested in #84 discussion
https://github.com/rust-bitcoin/rust-lightning/pull/84#discussion_r205508845
2018-07-27 18:19:00 -07:00
Matt Corallo
b8b7cb238d Convert fee API to per_kw instead of per_vb
This (a) cuts down a bit on some conversions, reducing chances for
bugsand (b) provides greater accuracy for clients.
2018-07-24 20:34:56 -04:00
Matt Corallo
e93c9fbeaf Migrate all Uint256s used for channel_ids to [u8; 32] 2018-07-22 18:55:20 -04:00
Matt Corallo
a611ae4741 Ensure the funding transaction is registered to be monitored 2018-07-22 13:59:11 -04:00
Matt Corallo
68e6beab7c Expose the script_pubkey being monitored in chain watch (fixes #44) 2018-07-19 22:22:14 -04:00
Matt Corallo
b02176c86b Fix various spec bugs, can now open channels with real nodes!
* commitment transaction number, as used in locktime/sequence
   fields is actually different from commitment transaction number,
   as used for revocation state. This is confusing and never stated
   in the spec, so we have to do the conversion.
 * max_htlc_value_in_flight is never constrained in the spec, but
   we were requiring it be <= channel size. Instead just clamp the
   values the peer sends us when storing.
 * channel_id calculation was incorrect, we now do some crazy
   conversion hops, which we shouldn't, but will need to change our
   types to fix.
 * Our channel_reserve_satoshis value was too low, just change the
   constant and leave the TODO to figure out what it really should
   be for now.
2018-07-19 17:25:47 -04:00
Matt Corallo
d62abad028 Add more docs to transaction::OutPoint 2018-06-29 17:38:05 -04:00
Jean Pierre Dudey
d0e9137bc5 Add the OutPoint type for the ChannelMonitor's funding_txo field.
This structure replaces the (Sha256dHash, u16) tuple that was being used
for the funding output.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-06-29 12:12:17 -04:00
Matt Corallo
738638fad4 Remove bitcoincorerpcchain, as it belongs in a separate crate 2018-06-14 18:05:13 -04:00
Matt Corallo
a5ec986fad Clean up a few comments after #11 merge. 2018-03-19 17:46:35 -04:00
Tamas Blummer
fbe4f7a442 Split out BroadcastInterface, ChainWatchInterface monitors re-enter from called listeners 2018-03-19 16:14:19 -04:00
Tamas Blummer
f200f26fe2 use new bitcoin-chain module extracted from bitcoin 2018-03-10 15:12:19 +01:00
Matt Corallo
ef8680349f Silence warning on essentially-unimplemented chain interface. 2018-02-21 11:35:43 -05:00
Matt Corallo
4e05b107a3 Add some light docs, rm empty walletinterface (better as events) 2018-02-21 09:49:21 -05:00
Matt Corallo
6185a28190 initial checkin 2018-02-16 18:09:48 -05:00