[#302] pkg/reputation: Document default values set in NewPeerID
Document field values of instance constructed via `NewPeerID`. Assert the values in corresponding unit test. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
d4327ec018
commit
cce7ecbc00
2 changed files with 28 additions and 6 deletions
|
@ -12,6 +12,9 @@ import (
|
|||
type PeerID reputation.PeerID
|
||||
|
||||
// NewPeerID creates and returns blank PeerID.
|
||||
//
|
||||
// Defaults:
|
||||
// - publicKey: nil.
|
||||
func NewPeerID() *PeerID {
|
||||
return PeerIDFromV2(new(reputation.PeerID))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue