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-bitswap
Commits
a82ac0a9
Commit
a82ac0a9
authored
Nov 18, 2014
by
Brian Tiger Chow
Committed by
Jeromy
Dec 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarify MessageReceived contract
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
56726e02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
strategy/strategy.go
strategy/strategy.go
+3
-1
No files found.
strategy/strategy.go
View file @
a82ac0a9
...
...
@@ -72,6 +72,8 @@ func (s *strategist) Seed(int64) {
// TODO
}
// MessageReceived performs book-keeping. Returns error if passed invalid
// arguments.
func
(
s
*
strategist
)
MessageReceived
(
p
peer
.
Peer
,
m
bsmsg
.
BitSwapMessage
)
error
{
s
.
lock
.
Lock
()
defer
s
.
lock
.
Unlock
()
...
...
@@ -91,7 +93,7 @@ func (s *strategist) MessageReceived(p peer.Peer, m bsmsg.BitSwapMessage) error
// FIXME extract blocks.NumBytes(block) or block.NumBytes() method
l
.
ReceivedBytes
(
len
(
block
.
Data
))
}
return
errors
.
New
(
"TODO"
)
return
nil
}
// TODO add contents of m.WantList() to my local wantlist? NB: could introduce
...
...
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