Skip to content

Commit d5e85cf

Browse files
committed
correct multicodec spelling
1 parent 7fe5979 commit d5e85cf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libp2p/multicodec.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const MultiCodecList = [
178178
("skein1024-1024", 0xB3E0),
179179
# poseidon2
180180
("poseidon2-alt_bn_128-sponge-r2", 0xCD10), # bn128 rate 2 sponge
181-
("poseidon2-alt_bn_128-mekle-2kb", 0xCD11), # bn128 2kb compress & merkleize
181+
("poseidon2-alt_bn_128-merkle-2kb", 0xCD11), # bn128 2kb compress & merkleize
182182
("poseidon2-alt_bn_128-keyed-compress", 0xCD12), # bn128 keyed compress
183183
# multiaddrs
184184
("ip4", 0x04),

libp2p/multihash.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,15 @@ const
329329
MHash(mcodec: multiCodec("blake2s-248"), size: 31, coder: blake2Shash),
330330
MHash(mcodec: multiCodec("blake2s-256"), size: 32, coder: blake2Shash),
331331
MHash(mcodec: multiCodec("poseidon2-alt_bn_128-sponge-r2"), size: 32, coder: poseidon2_sponge_rate2),
332-
MHash(mcodec: multiCodec("poseidon2-alt_bn_128-mekle-2kb"), size: 32, coder: poseidon2_merkle_2kb_sponge)
332+
MHash(mcodec: multiCodec("poseidon2-alt_bn_128-merkle-2kb"), size: 32, coder: poseidon2_merkle_2kb_sponge)
333333
]
334334

335335
proc initMultiHashCodeTable(): Table[MultiCodec, MHash] {.compileTime.} =
336336
for item in HashesList:
337337
result[item.mcodec] = item
338338

339339
const
340-
CodeHashes = initMultiHashCodeTable()
340+
CodeHashes* = initMultiHashCodeTable()
341341
MultiHashCodecsList* = HashesList.mapIt( it.mcodec )
342342

343343
proc digestImplWithHash(hash: MHash, data: openArray[byte]): MultiHash =

tests/testmultihash.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const
8989
"""909A0320823F7FB71C0998153E73AC734AE4870518F5FE324BD2484B68B565C288CF1E1E"""
9090
],
9191
[
92-
"poseidon2-alt_bn_128-mekle-2kb",
92+
"poseidon2-alt_bn_128-merkle-2kb",
9393
"hello world",
9494
"""919A0320D9A6AE0CBF28C5E9CBE28D7231D3A4DEDF8B3826B0F8C3C002CA95C21253E614"""
9595
]

0 commit comments

Comments
 (0)