Skip to content

Commit f139b33

Browse files
committedNov 19, 2014
peer_wants: fix silly bug in detecting peer's interests.
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>
1 parent 0461abd commit f139b33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎peer_wants.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

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

1111
return interests[shard/8] & (1 << (shard % 8));
1212
}

0 commit comments

Comments
 (0)
Please sign in to comment.