[#265] v2/reputation: Support PeerToPeerTrust message

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-04-09 11:28:06 +03:00 committed by Leonard Lyubich
parent 771f395d9d
commit 269288119d
10 changed files with 353 additions and 104 deletions

View file

@ -21,6 +21,14 @@ func (x *Trust) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(x, data, new(reputation.Trust))
}
func (x *PeerToPeerTrust) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(x)
}
func (x *PeerToPeerTrust) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(x, data, new(reputation.PeerToPeerTrust))
}
func (x *GlobalTrust) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(x)
}