fix: prevent nil dereference in `IsControlNode` for existing communities
This commit is contained in:
parent
05db628406
commit
fc8ce915af
|
@ -1086,7 +1086,7 @@ func (o *Community) ValidateEditSharedAddresses(signer *ecdsa.PublicKey, request
|
||||||
|
|
||||||
// We treat control node as an owner with community key
|
// We treat control node as an owner with community key
|
||||||
func (o *Community) IsControlNode() bool {
|
func (o *Community) IsControlNode() bool {
|
||||||
return o.config.PrivateKey != nil && o.config.PrivateKey.PublicKey.Equal(o.config.ControlNode)
|
return o.config.PrivateKey != nil && o.config.PrivateKey.PublicKey.Equal(o.ControlNode())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Community) IsOwnerWithoutCommunityKey() bool {
|
func (o *Community) IsOwnerWithoutCommunityKey() bool {
|
||||||
|
|
Loading…
Reference in New Issue