Matt Corallo
7ee8ec70ac
Default test logger to Trace to make error debugging easier
2018-08-16 23:11:22 -04:00
Matt Corallo
dc4af28759
Add some useful delayed-formatting formatters to macro_logger
2018-08-16 23:11:22 -04:00
Matt Corallo
ebd3bbba0f
Remove some dead Logger code
2018-08-16 23:11:15 -04:00
Matt Corallo
09583f3116
Fix PaymentReceived/sha256 handling in full_stack_target
...
Sha256 in fuzztarget was updated some time ago to use XOR instead
of the first byte of a real SHA256 run and somehow received and
sent payments got crossed in full_stack_target.
2018-08-16 22:37:44 -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
Antoine Riard
e752611247
Implement HandleError event with ErrorAction field
2018-08-12 00:36:48 +00:00
Matt Corallo
3db5798246
Stub out ChaCha20 non-HMAC encryption/decryption in fuzztarget
2018-08-02 22:37:28 -04:00
Matt Corallo
7f4602596c
Fix some tab-space errors in #84
2018-07-26 11:57:43 -04:00
Matt Corallo
fe9bb1d970
Merge pull request #84 from savil/sort_outputs
...
[RFC][Tx Sort] Implement sorting of inputs
2018-07-26 11:54:17 -04:00
Savil Srivastava
da09c4d7f3
adding BIP69 test-cases
2018-07-25 18:33:03 -07:00
Matt Corallo
af5c6e8186
PendingHTLCsForwardable really should just be upstreamed.
...
This is just a comment/docs/function rename change
2018-07-24 22:33:10 -04: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
Savil Srivastava
eb1eddcea0
[RFC][Tx Sort] Implement sorting of inputs
...
Follows BIP69: https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki
1. Implements sorting of transactoin inputs.
- BIP says to use "reversed byte-order" for the `prev_hash`. I interpreted this as: little-endian.
- TODO need to add tests
2. Re: improve sorting of TxOut's script_pubkey to use lexicographic ordering, and not length.
From the test-cases i've included it seems that the current code already does lexicographic ordering (and not length based). Am i missing something?
2018-07-23 20:26:26 -07:00
Antoine Riard
20fa9d331d
Add DisconnectPeer events
...
Add test for DisconnectPeer event
Update DisconnectPeer with optional ErrorMessage
Manage error for funding_transaction_generated
Add disconnect_socket to SocketDescriptor trait
2018-07-23 14:31:44 -04:00
Matt Corallo
7b4f382e26
Move shutdown sending to an event
2018-07-22 23:22:15 -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
7098ca3375
Make some more things pub(crate) as they don't need exposed now
2018-07-19 22:54:45 -04:00
Matt Corallo
0b82f5584f
Test channelmonitor serialization roundtrip doesn't mutate state
2018-07-17 14:59:29 -04:00
Matt Corallo
0553945e21
Implement channelmonitor (de)serialization ( fixes #45 )
2018-07-17 14:39:50 -04:00
Matt Corallo
c47525cb84
Move open_channel message handling into an event
...
This simplifies client usage cause peer_handler doesn't have an
interface to shove arbitrary messages in.
2018-07-06 17:31:01 -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
f462d8ac70
fuzztarget sha -> XOR, crates secp256k1
2018-06-04 20:02:07 -04:00
Matt Corallo
a20eef17c9
Fix local route update broadcasts, annouce channel closures
2018-04-24 20:42:24 -04:00
Matt Corallo
2d8afeccdb
Rewrite channelmonitor framework and implement a bunch of it
2018-04-24 20:42:24 -04:00
Matt Corallo
1ec9c3aa4b
Provide fallback for crypto's fixed_time_eq on non-x86/arm targets
2018-04-16 20:35:21 -04:00
Matt Corallo
374ea1f05e
Completely rewrite channel HTLC tracking and processing
...
It obviously was nonsensical prior, though its now way more
complicated...there's refactoring work to be done here, but it
should at least kinda sorta work now.
2018-04-16 20:35:21 -04:00
Matt Corallo
8b1a7ede27
Test that channel monitors get updated appropriately
2018-04-16 20:35:03 -04:00
Matt Corallo
8938cd7d78
Expand full_stack_target from uselessly-large to laughably-large
2018-04-02 18:07:03 -04:00
Matt Corallo
8e79c05a20
Add support for initiating channel closure to Channel{,Manager}
2018-04-02 18:07:03 -04:00
Matt Corallo
c528ff3650
Handle incoming shutdown messages
2018-04-02 18:07:02 -04:00
Matt Corallo
ab56b81acd
Stub out Sha256 calls when fuzzing
2018-03-23 13:16:24 -04:00
Matt Corallo
d0a3d0f728
Stub out ChaCha20Poly1305RFC when fuzzing
2018-03-23 13:16:24 -04:00
Matt Corallo
d18e54bd90
Stub out RNG when fuzzing
2018-03-23 13:16:24 -04:00
Matt Corallo
40ab09f627
Clarify roles in failing HTLCs, impl it, support rebalances
2018-03-22 17:35:30 -04:00
Matt Corallo
df11c05fa6
Use ChainWatchInterfaceUtil directly in tests instead of a wrapper
2018-03-19 17:46:37 -04:00
Tamas Blummer
fbe4f7a442
Split out BroadcastInterface, ChainWatchInterface monitors re-enter from called listeners
2018-03-19 16:14:19 -04:00
practicalswift
e7d0d8af9f
Fix typos
2018-02-27 23:38:52 +01:00
Matt Corallo
265c083674
Dont expose things that are purely internal-only
2018-02-24 19:59:59 -05:00
Matt Corallo
6185a28190
initial checkin
2018-02-16 18:09:48 -05:00