Fix: getblockfrompeer was always requesting block to the first peer
Changelog-Fixed: getblockfrompeer was always requesting block to the first peer
This commit is contained in:
committed by
Alex Myers
parent
dfd9e815ba
commit
36b3883215
@@ -644,7 +644,7 @@ static struct command_result *process_getpeerinfo(struct bitcoin_cli *bcli)
|
||||
start_bitcoin_cli(NULL, bcli->cmd, process_getblockfrompeer, true,
|
||||
BITCOIND_HIGH_PRIO, stash, "getblockfrompeer",
|
||||
stash->block_hash,
|
||||
take(tal_fmt(NULL, "%i", stash->peers[0])), NULL);
|
||||
take(tal_fmt(NULL, "%i", stash->peers[tal_count(stash->peers) - 1])), NULL);
|
||||
|
||||
return command_still_pending(bcli->cmd);
|
||||
}
|
||||
@@ -680,7 +680,7 @@ static struct command_result *process_getrawblock(struct bitcoin_cli *bcli)
|
||||
NULL, bcli->cmd, process_getblockfrompeer,
|
||||
true, BITCOIND_HIGH_PRIO, stash,
|
||||
"getblockfrompeer", stash->block_hash,
|
||||
take(tal_fmt(NULL, "%i", stash->peers[0])),
|
||||
take(tal_fmt(NULL, "%i", stash->peers[tal_count(stash->peers) - 1])),
|
||||
NULL);
|
||||
|
||||
return command_still_pending(bcli->cmd);
|
||||
|
||||
Reference in New Issue
Block a user