Get missing event tweaks (#1514)

* Adjust backfill to send backward extremity with state before other backfilled events, include prev_events with no state amongst missing events

* Not finished refactor

* Fix test

* Remove isInboundTxn

* Remove debug logging
This commit is contained in:
Neil Alexander 2020-10-12 15:56:15 +01:00 committed by GitHub
parent 0804594a61
commit 8001627cfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 81 additions and 28 deletions

View file

@ -122,7 +122,7 @@ func (r *Queryer) QueryMissingAuthPrevEvents(
}
for _, prevEventID := range request.PrevEventIDs {
if nids, err := r.DB.EventNIDs(ctx, []string{prevEventID}); err != nil || len(nids) == 0 {
if state, err := r.DB.StateAtEventIDs(ctx, []string{prevEventID}); err != nil || len(state) == 0 {
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
}
}