lnd.xprv/htlcswitch
Olaoluwa Osuntokun 9777176d7d
lnwallet: don't use persistent pointer to funding tx within channel state machine
This commit fixes a lingering bug that could at times cause
incompatibilities with other implementations when attempting a
cooperative channel close. Before this commit, we would use a pointer
to the funding txin everywhere. As a result, each time we made a new
state, or verified one, we would modify the sequence field of the main
txin of the commitment transaction. Due to this if we updated the
channel, then went to do a cooperative channel closure, the sequence of
the txin would still be set to the value we used as the state hint.

To remedy this, we now copy the txin each time when making the
commitment transaction, and also the cooperative closure transaction.
This avoids accidentally mutating the txin itself.

Fixes #502.
2017-12-22 19:26:35 +01:00
..
circuit_test.go htlcswitch: Rename htlcPacket fields for clarity. 2017-12-14 17:53:58 -08:00
circuit.go htlcswitch: Change circuit map keys to (channel ID, HTLC ID). 2017-12-14 17:53:58 -08:00
failure.go htlcswitch: add new ExtraMsg field to ForwardingError 2017-10-16 18:15:51 -07:00
interfaces.go htlcswitch: add new method to the ChannelLink interface, EligibleToForward 2017-12-06 16:42:57 -08:00
iterator.go htlcswitch: add additional error logging during onion process failures 2017-12-10 15:52:37 -08:00
link_test.go htlcswitch: extend timeouts within bandwidth consistency tests 2017-12-21 11:47:45 +01:00
link.go htlcswitch: Fix failure error handling on outgoing adds. 2017-12-14 17:53:58 -08:00
log.go lnd: remove seelog logger 2017-06-25 14:19:56 +01:00
mailbox_test.go multi: fix several typos in godoc comments 2017-12-17 18:40:05 -08:00
mailbox.go htlcswitch: add new mailBox abstraction to the package 2017-11-10 19:51:01 -08:00
mock.go htlcswitch: mockChannelLink adds to circuit map to simplify tests. 2017-12-14 17:53:58 -08:00
packet.go htlcswitch: Fix failure error handling on outgoing adds. 2017-12-14 17:53:58 -08:00
queue_test.go htlcswitch: Remove obsolete fields from htlcPacket. 2017-12-14 17:53:58 -08:00
queue.go htlcswitch: fix alignment of the packetQueue's fields for 32-bit systems (#507) 2017-12-22 16:32:11 +01:00
switch_test.go htlcswitch: Fix failure error handling on outgoing adds. 2017-12-14 17:53:58 -08:00
switch.go htlcswitch: Fix failure error handling on outgoing adds. 2017-12-14 17:53:58 -08:00
test_utils.go lnwallet: don't use persistent pointer to funding tx within channel state machine 2017-12-22 19:26:35 +01:00