| 188 | } |
| 189 | |
| 190 | static void gossipd_new_blockheight_reply(struct subd *gossipd, |
| 191 | const u8 *reply, |
| 192 | const int *fds UNUSED, |
| 193 | void *blockheight) |
| 194 | { |
| 195 | if (!fromwire_gossipd_new_blockheight_reply(reply)) { |
| 196 | /* Shouldn't happen! */ |
| 197 | log_broken(gossipd->ld->log, |
| 198 | "Invalid new_blockheight_reply from gossipd: %s", |
| 199 | tal_hex(tmpctx, reply)); |
| 200 | return; |
| 201 | } |
| 202 | |
| 203 | /* Now, finally update getinfo's blockheight */ |
| 204 | gossipd->ld->blockheight = ptr2int(blockheight); |
| 205 | } |
| 206 | |
| 207 | void gossip_notify_new_block(struct lightningd *ld, u32 blockheight) |
| 208 | { |