Change head sync update behaviour

This commit is contained in:
mcrakhman 2023-07-10 23:47:29 +02:00
parent 94aea5bafb
commit b4cc8d0a61
No known key found for this signature in database
GPG Key ID: DED12CFEF5B8396B

View File

@ -54,11 +54,11 @@ func (a *aclSyncProtocol) HeadUpdate(ctx context.Context, senderId string, updat
return
}
err = a.aclList.AddRawRecords(update.Records)
if err != nil && err != list.ErrIncorrectRecordSequence {
return
}
if err == list.ErrIncorrectRecordSequence {
return a.reqFactory.CreateFullSyncRequest(a.aclList, update.Head)
}
return
}
func (a *aclSyncProtocol) FullSyncRequest(ctx context.Context, senderId string, request *consensusproto.LogFullSyncRequest) (response *consensusproto.LogSyncMessage, err error) {
log := a.log.With(