mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-24 13:10:06 +08:00
Merge pull request #72 from libp2p/fix/unmarshal-peer-id
fix unmarshalling of peer IDs
This commit is contained in:
commit
1017515eca
@ -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