Restores access to hash list from testcid

This commit is contained in:
benbierens 2024-08-08 11:13:03 +02:00
parent 8df12becc3
commit 2b8db4f9d4
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
2 changed files with 2 additions and 4 deletions

View File

@ -237,7 +237,7 @@ proc poseidon2_merkle_2kb_sponge(data: openArray[byte], output: var openArray[by
var digest = poseidon2.SpongeMerkle.digest(data, 2048).toBytes()
copyMem(addr output[0], addr digest[0], uint(len(output)))
const HashesList = [
const HashesList* = [
MHash(mcodec: multiCodec("identity"), size: 0, coder: identhash),
MHash(mcodec: multiCodec("sha1"), size: sha1.sizeDigest, coder: sha1hash),
MHash(

View File

@ -9,12 +9,10 @@
# This file may not be copied, modified, or distributed except according to
# those terms.
import std/importutils
import unittest2
import std/sequtils
import ../libp2p/[cid, multihash, multicodec]
privateAccess(CodeHashes) # enable access to private fields
const MultiHashCodecsList* = HashesList.mapIt( it.mcodec )
suite "Content identifier CID test suite":