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
cbc9a085
Commit
cbc9a085
authored
Feb 28, 2016
by
Mildred Ki'Lya
Committed by
Shanti Bouchez-Mongardé
Mar 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merkledag: Remove cached Node.node
License: MIT Signed-off-by:
Mildred Ki'Lya
<
mildred-pub.git@mildred.fr
>
parent
8561017a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
node.go
node.go
+0
-10
No files found.
node.go
View file @
cbc9a085
...
...
@@ -48,9 +48,6 @@ type Link struct {
// multihash of the target object
Hash
mh
.
Multihash
// a ptr to the actual node for graph manipulation
node
*
Node
}
type
LinkSlice
[]
*
Link
...
...
@@ -78,10 +75,6 @@ func MakeLink(n *Node) (*Link, error) {
// GetNode returns the MDAG Node that this link points to
func
(
l
*
Link
)
GetNode
(
ctx
context
.
Context
,
serv
DAGService
)
(
*
Node
,
error
)
{
if
l
.
node
!=
nil
{
return
l
.
node
,
nil
}
return
serv
.
Get
(
ctx
,
key
.
Key
(
l
.
Hash
))
}
...
...
@@ -92,7 +85,6 @@ func (n *Node) AddNodeLink(name string, that *Node) error {
lnk
,
err
:=
MakeLink
(
that
)
lnk
.
Name
=
name
lnk
.
node
=
that
if
err
!=
nil
{
return
err
}
...
...
@@ -122,7 +114,6 @@ func (n *Node) AddRawLink(name string, l *Link) error {
Name
:
name
,
Size
:
l
.
Size
,
Hash
:
l
.
Hash
,
node
:
l
.
node
,
})
return
nil
...
...
@@ -158,7 +149,6 @@ func (n *Node) GetNodeLink(name string) (*Link, error) {
Name
:
l
.
Name
,
Size
:
l
.
Size
,
Hash
:
l
.
Hash
,
node
:
l
.
node
,
},
nil
}
}
...
...
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