Skip to content
5 changes: 1 addition & 4 deletions plugins/bcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ static struct command_result *getrawblockbyheight(struct command *cmd,
tal_fmt(tmpctx, "%u", *height), NULL);

if (res->exitstatus != 0) {
/* Exit code 8 means block height doesn't exist (empty response) */
if (res->exitstatus == 8)
return getrawblockbyheight_notfound(cmd);
return command_err(cmd, res, "command failed");
return getrawblockbyheight_notfound(cmd);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think returning a null response should be alright. I don't see the case we need to return error here. We can return an empty block and try again later. Tests are waiting the same behavior.

}

strip_trailing_whitespace(res->output, res->output_len);
Expand Down
Loading