Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lnwallet: fix HTLC mutation bug in commitment chain
This commit fixes a class of bug that can arise in the channel state machine when a very high throughput workflow is attempted. Since the PaymentDescriptor’s within a commitment pointed directly into the log, any changes to a payment descriptor would also be reflected in all other ones. Due to this mutation possibility, at times, the locateOutputIndex method would fail since the HTLC’s pkScript was modified, causing the channel to fail. We fix this class of bug by simply ensure that once an HTLC has been associated with a particular commitment, then it becomes immutable.
- Loading branch information