minor variable refactor

This commit is contained in:
Adin Schmahmann 2019-10-18 03:25:24 -04:00 committed by GitHub
parent d28f450046
commit c0494a42f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -736,11 +736,11 @@ func (p *PubSub) GetTopics() []string {
// Publish publishes data to the given topic.
func (p *PubSub) Publish(topic string, data []byte) error {
seqno := p.nextSeqno()
hostID := p.host.ID()
id := p.host.ID()
m := &pb.Message{
Data: data,
TopicIDs: []string{topic},
From: []byte(hostID),
From: []byte(id),
Seqno: seqno,
}
if p.signKey != nil {
@ -750,7 +750,7 @@ func (p *PubSub) Publish(topic string, data []byte) error {
return err
}
}
p.publish <- &Message{m, hostID}
p.publish <- &Message{m, id}
return nil
}