Skip to content

Commit 743be34

Browse files
Merge pull request #3616 from ipfs/fix/cbor-spec
update to the correct ipld cbor code
2 parents 585a0d9 + 8c3f780 commit 743be34

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

core/commands/dag/dag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
path "github.com/ipfs/go-ipfs/path"
1010

1111
node "gx/ipfs/QmRSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16/go-ipld-node"
12-
ipldcbor "gx/ipfs/QmbuuwTd9x4NReZ7sxtiKk7wFcfDUo54MfWBdtF5MRCPGR/go-ipld-cbor"
1312
cid "gx/ipfs/QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD/go-cid"
13+
ipldcbor "gx/ipfs/QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX/go-ipld-cbor"
1414
)
1515

1616
var DagCmd = &cmds.Command{

merkledag/merkledag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313

1414
node "gx/ipfs/QmRSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16/go-ipld-node"
1515
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
16-
ipldcbor "gx/ipfs/QmbuuwTd9x4NReZ7sxtiKk7wFcfDUo54MfWBdtF5MRCPGR/go-ipld-cbor"
1716
cid "gx/ipfs/QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD/go-cid"
17+
ipldcbor "gx/ipfs/QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX/go-ipld-cbor"
1818
)
1919

2020
var log = logging.Logger("merkledag")

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@
272272
},
273273
{
274274
"author": "whyrusleeping",
275-
"hash": "QmbuuwTd9x4NReZ7sxtiKk7wFcfDUo54MfWBdtF5MRCPGR",
275+
"hash": "QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX",
276276
"name": "go-ipld-cbor",
277-
"version": "0.4.2"
277+
"version": "1.0.0"
278278
},
279279
{
280280
"author": "lgierth",

test/sharness/t0053-dag.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ test_expect_success "make a few test files" '
1515
echo "bar" > file2 &&
1616
echo "baz" > file3 &&
1717
echo "qux" > file4 &&
18-
HASH1=$(ipfs add -q file1) &&
19-
HASH2=$(ipfs add -q file2) &&
20-
HASH3=$(ipfs add -q file3) &&
21-
HASH4=$(ipfs add -q file4)
18+
HASH1=$(ipfs add --pin=false -q file1) &&
19+
HASH2=$(ipfs add --pin=false -q file2) &&
20+
HASH3=$(ipfs add --pin=false -q file3) &&
21+
HASH4=$(ipfs add --pin=false -q file4)
2222
'
2323

2424
test_expect_success "make an ipld object in json" '
@@ -31,7 +31,7 @@ test_dag_cmd() {
3131
'
3232

3333
test_expect_success "output looks correct" '
34-
EXPHASH="zdpuApvChR5xM7ttbQmpmtna7wcShHi4gPyxUcWbB7nh8K7cN"
34+
EXPHASH="zdpuAzn7KZcQmKJvpEM1DgHXaybVj7mRP4ZMrkW94taYEuZHp"
3535
test $EXPHASH = $IPLDHASH
3636
'
3737

@@ -47,6 +47,15 @@ test_dag_cmd() {
4747
test_cmp file3 out3
4848
'
4949

50+
test_expect_success "can pin cbor object" '
51+
ipfs pin add $EXPHASH
52+
'
53+
54+
test_expect_success "after gc, objects still acessible" '
55+
ipfs repo gc > /dev/null &&
56+
ipfs refs -r --timeout=2s $EXPHASH > /dev/null
57+
'
58+
5059
test_expect_success "add a normal file" '
5160
HASH=$(echo "foobar" | ipfs add -q)
5261
'

0 commit comments

Comments
 (0)