• Rusty Russell's avatar
    tdb2: approximate INCOMPATIBLE_HASH flag with tdb1_incompatible_hash() · 3004f7e8
    Rusty Russell authored
    Rather than leak TDB_INCOMPATIBLE_HASH through to the TDB2 API, we make
    it that if they use the tdb1_incompatible_hash function as their hash,
    then we treat it as if they had specified the TDB_INCOMPATIBLE_HASH
    flag (ie. we mark the header so it's unusable by tdb < 1.2.6).
    
    This precludes the possibility of using TDB_INCOMPATIBLE_HASH with a
    custom hash function: that used to allow the user to ensure that old TDB
    versions couldn't open the TDB file (and recent ones check the header to
    ensure they're using the right hash).  But that's a small loss.
    3004f7e8
tdb1_open.c 13.3 KB