We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfd9e81 commit 36b3883Copy full SHA for 36b3883
plugins/bcli.c
@@ -644,7 +644,7 @@ static struct command_result *process_getpeerinfo(struct bitcoin_cli *bcli)
644
start_bitcoin_cli(NULL, bcli->cmd, process_getblockfrompeer, true,
645
BITCOIND_HIGH_PRIO, stash, "getblockfrompeer",
646
stash->block_hash,
647
- take(tal_fmt(NULL, "%i", stash->peers[0])), NULL);
+ take(tal_fmt(NULL, "%i", stash->peers[tal_count(stash->peers) - 1])), NULL);
648
649
return command_still_pending(bcli->cmd);
650
}
@@ -680,7 +680,7 @@ static struct command_result *process_getrawblock(struct bitcoin_cli *bcli)
680
NULL, bcli->cmd, process_getblockfrompeer,
681
true, BITCOIND_HIGH_PRIO, stash,
682
"getblockfrompeer", stash->block_hash,
683
- take(tal_fmt(NULL, "%i", stash->peers[0])),
+ take(tal_fmt(NULL, "%i", stash->peers[tal_count(stash->peers) - 1])),
684
NULL);
685
686
0 commit comments