matchingPrefix

fun matchingPrefix(nid: Sha1Hash, mask: Int, prefix: Int, offset: Int): Boolean

true iff, after shifting nid left by offset bits, the top byte ANDed with mask equals prefix. Port of bool matching_prefix(node_id const& nid, int mask, int prefix, int offset).