fix: crash on control node side dutring handling edited shared address from the member who left the community (#4967)
This commit is contained in:
parent
14cf4b734f
commit
b931a75bd8
|
@ -1176,7 +1176,12 @@ func (o *Community) ValidateEditSharedAddresses(signer *ecdsa.PublicKey, request
|
||||||
return errors.New("no addresses were shared")
|
return errors.New("no addresses were shared")
|
||||||
}
|
}
|
||||||
|
|
||||||
if request.Clock < o.config.CommunityDescription.Members[common.PubkeyToHex(signer)].LastUpdateClock {
|
member, exists := o.config.CommunityDescription.Members[common.PubkeyToHex(signer)]
|
||||||
|
if !exists {
|
||||||
|
return errors.New("signer is not a community member")
|
||||||
|
}
|
||||||
|
|
||||||
|
if request.Clock < member.LastUpdateClock {
|
||||||
return errors.New("edit request is older than the last one we have. Ignore")
|
return errors.New("edit request is older than the last one we have. Ignore")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue