Commit f2b6c3a
committed
[workaround]lnwallet: set remote update log blinding point from pending
This commit adds a workaround for the fact that we don't have our extra
htlc data (ie, that provided in tlvs) stored in channeldb.HTLC. It
ensures that we have the blinding point populated on restart for the
following set of circumstances:
* The incoming HTLC is irrevocably committed to in our local commitment,
ie: we have received a CommitSig and sent a RevokeAndAck for a
commitment that includes the incoming HTLC.
* The incoming HTLC is still pending on the sender, ie: we have not yet
sent the remote party a CommitSig covering the incoming HTLC.
If we restart at this point, the htlc will be stored as an incoming htlc
on our local commitment (with no blinding point) and the full log update
will be saved as a LogUpdate in our remote pending updates (because we
have not yet provided the remote party with a signature).
We restore our remoteUpdateLog from the local commit's incoming htlcs,
so before this change these htlcs would be loaded into our in-memory log
without their blinding point set (and operation would incorrectly resume
as usual without it). This commit updates our logic to restore blinding
points (if set) to the htlcs in the remoteUpdateLog.1 parent cfc48bd commit f2b6c3a
1 file changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
1112 | 1117 | | |
1113 | 1118 | | |
1114 | 1119 | | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
1115 | 1137 | | |
1116 | 1138 | | |
1117 | 1139 | | |
| |||
2039 | 2061 | | |
2040 | 2062 | | |
2041 | 2063 | | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
2042 | 2068 | | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
2043 | 2075 | | |
2044 | 2076 | | |
2045 | 2077 | | |
| |||
0 commit comments