parent
c4cd5775db
commit
a42e2907b9
|
@ -1337,14 +1337,7 @@ func (m *Manager) validateAndFilterEvents(community *Community, events []Communi
|
||||||
validatedEvents := make([]CommunityEvent, 0, len(events))
|
validatedEvents := make([]CommunityEvent, 0, len(events))
|
||||||
|
|
||||||
validateEvent := func(event *CommunityEvent) error {
|
validateEvent := func(event *CommunityEvent) error {
|
||||||
if event.Signature == nil || len(event.Signature) == 0 {
|
signer, err := event.RecoverSigner()
|
||||||
return errors.New("missing signature")
|
|
||||||
}
|
|
||||||
|
|
||||||
signer, err := crypto.SigToPub(
|
|
||||||
crypto.Keccak256(event.Payload),
|
|
||||||
event.Signature,
|
|
||||||
)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue