• Hector Sanjuan's avatar
    Remove DsKeyToCid() and CidToDsKey(). Add DsKeyToCidV1Raw() · 48143f3d
    Hector Sanjuan authored
    We are deprecating these functions as ipfs strives to store
    multihashes directly on the datastore, rather than CIDs.
    
    Thus multiple CIDs might map to the same multihash. Making this functions
    reflect that behaviour might cause silent breakage in users. We prefer loud
    breakage.
    
    Users using CidToDsKey(c) should move to MultihashToDsKey(c.Hash()).
    
    Users using DsKeyToCid() should move to DsKeyToCidV1Raw() or DsKeyToMultihash().
    
    Note that datastore should handle migrations to replace existing CID-encoded
    keys with raw multihashes, or preserve DsKeyToCid() and CidToDsKey() in their
    own codebases.
    48143f3d
key_test.go 540 Bytes