Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-merkledag
Commits
119ca42b
Commit
119ca42b
authored
Nov 28, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bubble up go-datastore deps
License: MIT Signed-off-by:
Jeromy
<
why@ipfs.io
>
parent
7737cb02
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
23 deletions
+23
-23
coding.go
coding.go
+2
-2
merkledag.go
merkledag.go
+5
-5
merkledag_test.go
merkledag_test.go
+2
-2
node.go
node.go
+2
-2
node_test.go
node_test.go
+1
-1
raw.go
raw.go
+2
-2
test/utils.go
test/utils.go
+2
-2
traverse/traverse.go
traverse/traverse.go
+1
-1
traverse/traverse_test.go
traverse/traverse_test.go
+1
-1
utils/diff.go
utils/diff.go
+1
-1
utils/utils.go
utils/utils.go
+3
-3
utils/utils_test.go
utils/utils_test.go
+1
-1
No files found.
coding.go
View file @
119ca42b
...
...
@@ -6,9 +6,9 @@ import (
pb
"github.com/ipfs/go-ipfs/merkledag/pb"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
u
"gx/ipfs/Qmb912gdngC1UWwTkhuW8knyRbcWeu5kqkxBpveLmW8bSr/go-ipfs-util"
cid
"gx/ipfs/Qmc
EcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
cid
"gx/ipfs/Qmc
TcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD
/go-cid"
)
// for now, we use a PBNode intermediate thing.
...
...
merkledag.go
View file @
119ca42b
...
...
@@ -11,10 +11,10 @@ import (
bserv
"github.com/ipfs/go-ipfs/blockservice"
offline
"github.com/ipfs/go-ipfs/exchange/offline"
node
"gx/ipfs/QmRSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16/go-ipld-node"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
node
"gx/ipfs/QmUsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq/go-ipld-node"
ipldcbor
"gx/ipfs/QmVVfh9urmDSL1upPtAKKMxFUwW1R6hYr95uCuJUP8RhUu/go-ipld-cbor"
cid
"gx/ipfs/QmcEcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU/go-cid"
ipldcbor
"gx/ipfs/QmbuuwTd9x4NReZ7sxtiKk7wFcfDUo54MfWBdtF5MRCPGR/go-ipld-cbor"
cid
"gx/ipfs/QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD/go-cid"
)
var
log
=
logging
.
Logger
(
"merkledag"
)
...
...
@@ -93,7 +93,7 @@ func decodeBlock(b blocks.Block) (node.Node, error) {
c
:=
b
.
Cid
()
switch
c
.
Type
()
{
case
cid
.
Protobuf
:
case
cid
.
Dag
Protobuf
:
decnd
,
err
:=
DecodeProtobuf
(
b
.
RawData
())
if
err
!=
nil
{
if
strings
.
Contains
(
err
.
Error
(),
"Unmarshal failed"
)
{
...
...
@@ -106,7 +106,7 @@ func decodeBlock(b blocks.Block) (node.Node, error) {
return
decnd
,
nil
case
cid
.
Raw
:
return
NewRawNode
(
b
.
RawData
()),
nil
case
cid
.
CBOR
:
case
cid
.
Dag
CBOR
:
return
ipldcbor
.
Decode
(
b
.
RawData
())
default
:
return
nil
,
fmt
.
Errorf
(
"unrecognized object type: %s"
,
c
.
Type
())
...
...
merkledag_test.go
View file @
119ca42b
...
...
@@ -21,9 +21,9 @@ import (
dstest
"github.com/ipfs/go-ipfs/merkledag/test"
uio
"github.com/ipfs/go-ipfs/unixfs/io"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
u
"gx/ipfs/Qmb912gdngC1UWwTkhuW8knyRbcWeu5kqkxBpveLmW8bSr/go-ipfs-util"
cid
"gx/ipfs/Qmc
EcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
cid
"gx/ipfs/Qmc
TcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD
/go-cid"
)
func
TestNode
(
t
*
testing
.
T
)
{
...
...
node.go
View file @
119ca42b
...
...
@@ -4,9 +4,9 @@ import (
"context"
"fmt"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
mh
"gx/ipfs/QmYDds3421prZgqKbLpEK7T9Aa2eVdQ7o3YarX1LVLdP2J/go-multihash"
cid
"gx/ipfs/Qmc
EcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
cid
"gx/ipfs/Qmc
TcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD
/go-cid"
)
var
ErrNotProtobuf
=
fmt
.
Errorf
(
"expected protobuf dag node"
)
...
...
node_test.go
View file @
119ca42b
...
...
@@ -7,7 +7,7 @@ import (
.
"github.com/ipfs/go-ipfs/merkledag"
mdtest
"github.com/ipfs/go-ipfs/merkledag/test"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
)
func
TestRemoveLink
(
t
*
testing
.
T
)
{
...
...
raw.go
View file @
119ca42b
...
...
@@ -3,9 +3,9 @@ package merkledag
import
(
"github.com/ipfs/go-ipfs/blocks"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
u
"gx/ipfs/Qmb912gdngC1UWwTkhuW8knyRbcWeu5kqkxBpveLmW8bSr/go-ipfs-util"
cid
"gx/ipfs/Qmc
EcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
cid
"gx/ipfs/Qmc
TcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD
/go-cid"
)
type
RawNode
struct
{
...
...
test/utils.go
View file @
119ca42b
...
...
@@ -5,8 +5,8 @@ import (
bsrv
"github.com/ipfs/go-ipfs/blockservice"
"github.com/ipfs/go-ipfs/exchange/offline"
dag
"github.com/ipfs/go-ipfs/merkledag"
ds
"gx/ipfs/Qm
bzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU
/go-datastore"
dssync
"gx/ipfs/Qm
bzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU
/go-datastore/sync"
ds
"gx/ipfs/Qm
RWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364
/go-datastore"
dssync
"gx/ipfs/Qm
RWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364
/go-datastore/sync"
)
func
Mock
()
dag
.
DAGService
{
...
...
traverse/traverse.go
View file @
119ca42b
...
...
@@ -5,7 +5,7 @@ import (
"context"
"errors"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
)
// Order is an identifier for traversal algorithm orders
...
...
traverse/traverse_test.go
View file @
119ca42b
...
...
@@ -8,7 +8,7 @@ import (
mdag
"github.com/ipfs/go-ipfs/merkledag"
mdagtest
"github.com/ipfs/go-ipfs/merkledag/test"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
)
func
TestDFSPreNoSkip
(
t
*
testing
.
T
)
{
...
...
utils/diff.go
View file @
119ca42b
...
...
@@ -7,7 +7,7 @@ import (
dag
"github.com/ipfs/go-ipfs/merkledag"
context
"context"
cid
"gx/ipfs/Qmc
EcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
cid
"gx/ipfs/Qmc
TcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD
/go-cid"
)
const
(
...
...
utils/utils.go
View file @
119ca42b
...
...
@@ -10,9 +10,9 @@ import (
dag
"github.com/ipfs/go-ipfs/merkledag"
path
"github.com/ipfs/go-ipfs/path"
node
"gx/ipfs/Qm
UsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
ds
"gx/ipfs/Qm
bzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU
/go-datastore"
syncds
"gx/ipfs/Qm
bzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU
/go-datastore/sync"
node
"gx/ipfs/Qm
RSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16
/go-ipld-node"
ds
"gx/ipfs/Qm
RWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364
/go-datastore"
syncds
"gx/ipfs/Qm
RWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364
/go-datastore/sync"
)
type
Editor
struct
{
...
...
utils/utils_test.go
View file @
119ca42b
...
...
@@ -8,7 +8,7 @@ import (
path
"github.com/ipfs/go-ipfs/path"
context
"context"
cid
"gx/ipfs/Qmc
EcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
cid
"gx/ipfs/Qmc
TcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD
/go-cid"
)
func
TestAddLink
(
t
*
testing
.
T
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment