Skip to content

Commit

Permalink
peer_wants: fix silly bug in detecting peer's interests.
Browse files Browse the repository at this point in the history
This was caused by d0b20ca, which
put the interest map into the welcome packet, but didn't fix this code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Nov 19, 2014
1 parent 0461abd commit f139b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion peer_wants.c
Expand Up @@ -6,7 +6,7 @@

static bool peer_wants_shard(const struct peer *peer, u16 shard)
{
const u8 *interests = (const u8 *)(peer->welcome + 1);
const u8 *interests = peer->welcome->interests;

return interests[shard/8] & (1 << (shard % 8));
}
Expand Down

0 comments on commit f139b33

Please sign in to comment.