<commit_before>#ifndef _DHASH_COMMON_H_
#define _DHASH_COMMON_H_

#include <chord_types.h>
#include <dhash_prot.h>
#include <crypt.h>

#define DHASHCLIENT_GUESS_SUPPLIED 0x1
#define DHASHCLIENT_NO_RETRY_ON_LOOKUP 0x2
// pls leave these two options here, proxy server currently uses them
// - benjie
#define DHASHCLIENT_USE_CACHE 0x4
#define DHASHCLIENT_CACHE 0x8
#define DHASHCLIENT_SUCCLIST_OPT 0x10
#define DHASHCLIENT_NEWBLOCK 0x20
#define DHASHCLIENT_RMW 0x40

struct blockID {
  chordID ID;
  dhash_ctype ctype;

  blockID (chordID k, dhash_ctype c) : ID (k), ctype (c) {};
  // blockID (const blockID &b) : ID (b.ID), ctype (b.ctype) {};

  bool operator== (const blockID b) const {
    return ((ID == b.ID) &&
	    (ctype == b.ctype));<commit_msg>blockID needs a copy constructor to use it like that.<commit_after>#ifndef _DHASH_COMMON_H_
#define _DHASH_COMMON_H_

#include <chord_types.h>
#include <dhash_prot.h>
#include <crypt.h>

#define DHASHCLIENT_GUESS_SUPPLIED 0x1
#define DHASHCLIENT_NO_RETRY_ON_LOOKUP 0x2
// pls leave these two options here, proxy server currently uses them
// - benjie
#define DHASHCLIENT_USE_CACHE 0x4
#define DHASHCLIENT_CACHE 0x8
#define DHASHCLIENT_SUCCLIST_OPT 0x10
#define DHASHCLIENT_NEWBLOCK 0x20
#define DHASHCLIENT_RMW 0x40

struct blockID {
  chordID ID;
  dhash_ctype ctype;

  blockID (chordID k, dhash_ctype c) : ID (k), ctype (c) {};
  blockID (const blockID &b) : ID (b.ID), ctype (b.ctype) {};

  bool operator== (const blockID b) const {
    return ((ID == b.ID) &&
	    (ctype == b.ctype));
{'fraction_non_alphanumeric': 0.10420711974110032, 'fraction_numerical': 0.022006472491909384, 'mean_word_length': 4.900763358778626, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4185619', 'n_tokens_mistral': 656, 'n_tokens_neox': 607, 'n_words': 162}