Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 6af1270

Browse files
committed
fixup! feat!: update interface-ipfs-core DAG API to match [email protected]
1 parent 3ecbd8b commit 6af1270

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/interface-ipfs-core/src/block/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function testGet (factory, options) {
4747

4848
it('should get an empty block', async () => {
4949
const cid = await ipfs.block.put(new Uint8Array(0), {
50-
storeCodec: 'dag-pb',
50+
format: 'dag-pb',
5151
mhtype: 'sha2-256',
5252
version: 0
5353
})

packages/interface-ipfs-core/src/utils/blockstore-adapter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
88
/**
99
* @type {Record<number, string>}
1010
*/
11-
const codecNames = {
11+
const formats = {
1212
[raw.code]: raw.name,
1313
[dagPB.code]: dagPB.name,
1414
[dagCBOR.code]: dagCBOR.name
@@ -37,7 +37,7 @@ class IPFSBlockstore extends BaseBlockstore {
3737
*/
3838
async put (cid, buf) {
3939
const c = await this.ipfs.block.put(buf, {
40-
storeCodec: codecNames[cid.code],
40+
format: formats[cid.code],
4141
mhtype: hashes[cid.multihash.code],
4242
version: cid.version
4343
})

0 commit comments

Comments
 (0)