mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-30 13:50:07 +08:00
fix unmarshalling of peer IDs
This commit is contained in:
parent
deb2163a68
commit
926321cd88
@ -46,7 +46,7 @@ func (id *ProtoPeerID) Unmarshal(data []byte) (err error) {
|
||||
|
||||
func (id *ProtoPeerID) UnmarshalJSON(data []byte) error {
|
||||
var v []byte
|
||||
err := json.Unmarshal(data, v)
|
||||
err := json.Unmarshal(data, &v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user