bcli: make last height optional

This is on me, and the last height is optional, and not required,
because sometimes you do not want wait the sync of the blockchain
but just get the information of the current status.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
Vincenzo Palazzo 2024-05-17 22:58:25 +02:00 committed by Alex Myers
parent 037d269a58
commit 4b4516c67c

View File

@ -804,7 +804,7 @@ static struct command_result *getchaininfo(struct command *cmd,
* However, I currently don't have a better idea on how to handle this situation. */
u32 *height UNUSED;
if (!param(cmd, buf, toks,
p_req("last_height", param_number, &height),
p_opt("last_height", param_number, &height),
NULL))
return command_param_failed();