add ValidatorData field to Message
Useful for passing data from the validation to the application.
This commit is contained in:
parent
534fe2f382
commit
8b423348a0
|
@ -151,6 +151,7 @@ type PubSubRouter interface {
|
|||
type Message struct {
|
||||
*pb.Message
|
||||
ReceivedFrom peer.ID
|
||||
VaidatorData interface{}
|
||||
}
|
||||
|
||||
func (m *Message) GetFrom() peer.ID {
|
||||
|
@ -688,7 +689,7 @@ func (p *PubSub) handleIncomingRPC(rpc *RPC) {
|
|||
continue
|
||||
}
|
||||
|
||||
msg := &Message{pmsg, rpc.from}
|
||||
msg := &Message{pmsg, rpc.from, nil}
|
||||
p.pushMsg(msg)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue