diff --git a/pubsub.go b/pubsub.go index 53e4bc4..e46f4df 100644 --- a/pubsub.go +++ b/pubsub.go @@ -155,6 +155,7 @@ type PubSubRouter interface { type Message struct { *pb.Message ReceivedFrom peer.ID + VaidatorData interface{} } func (m *Message) GetFrom() peer.ID { @@ -705,7 +706,7 @@ func (p *PubSub) handleIncomingRPC(rpc *RPC) { continue } - msg := &Message{pmsg, rpc.from} + msg := &Message{pmsg, rpc.from, nil} p.pushMsg(msg) } diff --git a/topic.go b/topic.go index 5434791..1b57c86 100644 --- a/topic.go +++ b/topic.go @@ -167,7 +167,7 @@ func (t *Topic) Publish(ctx context.Context, data []byte, opts ...PubOpt) error } select { - case t.p.publish <- &Message{m, id}: + case t.p.publish <- &Message{m, id, nil}: case <-t.p.ctx.Done(): return t.p.ctx.Err() }