Commit 8f89371
committed
Update
We update the `Channel::update_time_counter` field (which is copied
into `ChannelUpdate::timestamp`) only when the channel is
initialized or closes, and when a new block is connected. However,
if a peer disconnects or reconnects, we may wish to generate
`ChannelUpdate` updates in between new blocks. In such a case, we
need to make sure the `timestamp` field is newer than any previous
updates' `timestamp` fields, which we do here by simply
incrementing it when the channel status is changed.
As a side effect of this we have to update
`test_background_processor` to ensure it eventually succeeds even
if the serialization of the `ChannelManager` changes after the test
begins.ChannelUpdate::timestamp when channels are dis-/en-abled1 parent 74828d2 commit 8f89371
File tree
3 files changed
+20
-15
lines changed- lightning-background-processor/src
- lightning/src/ln
3 files changed
+20
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
498 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
499 | 500 | | |
500 | 501 | | |
501 | 502 | | |
| |||
506 | 507 | | |
507 | 508 | | |
508 | 509 | | |
509 | | - | |
510 | | - | |
511 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
512 | 513 | | |
513 | 514 | | |
514 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4167 | 4167 | | |
4168 | 4168 | | |
4169 | 4169 | | |
| 4170 | + | |
4170 | 4171 | | |
4171 | 4172 | | |
4172 | 4173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7313 | 7313 | | |
7314 | 7314 | | |
7315 | 7315 | | |
7316 | | - | |
7317 | | - | |
7318 | | - | |
| 7316 | + | |
| 7317 | + | |
| 7318 | + | |
7319 | 7319 | | |
7320 | 7320 | | |
7321 | 7321 | | |
| |||
7325 | 7325 | | |
7326 | 7326 | | |
7327 | 7327 | | |
7328 | | - | |
| 7328 | + | |
7329 | 7329 | | |
7330 | 7330 | | |
7331 | 7331 | | |
7332 | 7332 | | |
7333 | 7333 | | |
7334 | | - | |
| 7334 | + | |
7335 | 7335 | | |
7336 | 7336 | | |
7337 | 7337 | | |
| |||
7367 | 7367 | | |
7368 | 7368 | | |
7369 | 7369 | | |
7370 | | - | |
7371 | 7370 | | |
7372 | 7371 | | |
7373 | 7372 | | |
7374 | 7373 | | |
7375 | | - | |
7376 | | - | |
7377 | | - | |
| 7374 | + | |
| 7375 | + | |
| 7376 | + | |
| 7377 | + | |
| 7378 | + | |
7378 | 7379 | | |
7379 | 7380 | | |
7380 | 7381 | | |
7381 | 7382 | | |
7382 | 7383 | | |
| 7384 | + | |
| 7385 | + | |
7383 | 7386 | | |
7384 | 7387 | | |
7385 | 7388 | | |
| |||
0 commit comments