Get previous update. */
| 696 | |
| 697 | /* Get previous update. */ |
| 698 | static u8 *prev_update(const tal_t *ctx, |
| 699 | struct daemon *daemon, const struct chan *chan, int direction) |
| 700 | { |
| 701 | u8 *prev; |
| 702 | |
| 703 | if (!is_halfchan_defined(&chan->half[direction])) |
| 704 | return NULL; |
| 705 | |
| 706 | prev = cast_const(u8 *, |
| 707 | gossip_store_get(tmpctx, daemon->rstate->gs, |
| 708 | chan->half[direction].bcast.index)); |
| 709 | |
| 710 | /* If it's a private update, unwrap */ |
| 711 | if (!fromwire_gossip_store_private_update(ctx, prev, &prev)) |
| 712 | tal_steal(ctx, prev); |
| 713 | return prev; |
| 714 | } |
| 715 | |
| 716 | /* This is a refresh of a local channel (after 13 days). */ |
| 717 | void refresh_local_channel(struct daemon *daemon, |
no test coverage detected