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
p2p
go-p2p-pubsub
Commits
67eece25
Commit
67eece25
authored
Jan 21, 2019
by
vyzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move timecache check/update after validation
parent
ef065c2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
pubsub.go
pubsub.go
+6
-6
No files found.
pubsub.go
View file @
67eece25
...
...
@@ -625,12 +625,6 @@ func (p *PubSub) pushMsg(vals []*topicVal, src peer.ID, msg *Message) {
return
}
id
:=
msgID
(
msg
.
Message
)
if
p
.
seenMessage
(
id
)
{
return
}
p
.
markSeen
(
id
)
if
len
(
vals
)
>
0
||
msg
.
Signature
!=
nil
{
// validation is asynchronous and globally throttled with the throttleValidate semaphore.
// the purpose of the global throttle is to bound the goncurrency possible from incoming
...
...
@@ -747,6 +741,12 @@ func (p *PubSub) validateSingleTopic(val *topicVal, src peer.ID, msg *Message) b
}
func
(
p
*
PubSub
)
publishMessage
(
from
peer
.
ID
,
pmsg
*
pb
.
Message
)
{
id
:=
msgID
(
pmsg
)
if
p
.
seenMessage
(
id
)
{
return
}
p
.
markSeen
(
id
)
p
.
notifySubs
(
pmsg
)
p
.
rt
.
Publish
(
from
,
pmsg
)
}
...
...
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