connectd: check all chain hashs of the TLV array

This commit is contained in:
darosior
2019-12-25 00:34:59 +01:00
committed by Christian Decker
parent 4f3e8d461e
commit 9dcbf20a7a

View File

@@ -30,7 +30,7 @@ struct peer {
static bool contains_common_chain(struct bitcoin_blkid *chains)
{
for (size_t i = 0; i < tal_count(chains); i++) {
if (bitcoin_blkid_eq(&chains[0], &chainparams->genesis_blockhash))
if (bitcoin_blkid_eq(&chains[i], &chainparams->genesis_blockhash))
return true;
}
return false;