daemon/chaintopology: use struct topology for more functions, not lightningd_state

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-03-02 22:51:49 +10:30
parent 923526baf3
commit 61e576ef12
11 changed files with 166 additions and 138 deletions

View File

@@ -275,7 +275,8 @@ static void json_getinfo(struct command *cmd,
json_add_num(response, "port", cmd->dstate->portnum);
json_add_bool(response, "testnet", cmd->dstate->testnet);
json_add_string(response, "version", version());
json_add_num(response, "blockheight", get_block_height(cmd->dstate));
json_add_num(response, "blockheight",
get_block_height(cmd->dstate->topology));
json_object_end(response);
command_success(cmd, response);
}