Remove debug logging

This commit is contained in:
Neil Alexander 2020-10-12 15:50:39 +01:00
parent 73426b6c47
commit ad2168f697
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -479,8 +479,6 @@ func (t *txnReq) processEventWithMissingState(ctx context.Context, e gomatrixser
backwardsExtremity := &newEvents[0] backwardsExtremity := &newEvents[0]
newEvents = newEvents[1:] newEvents = newEvents[1:]
fmt.Println(len(newEvents), "new events")
// at this point we know we're going to have a gap: we need to work out the room state at the new backwards extremity. // at this point we know we're going to have a gap: we need to work out the room state at the new backwards extremity.
// Therefore, we cannot just query /state_ids with this event to get the state before. Instead, we need to query // Therefore, we cannot just query /state_ids with this event to get the state before. Instead, we need to query
// the state AFTER all the prev_events for this event, then apply state resolution to that to get the state before the event. // the state AFTER all the prev_events for this event, then apply state resolution to that to get the state before the event.
@ -524,7 +522,6 @@ func (t *txnReq) processEventWithMissingState(ctx context.Context, e gomatrixser
t.haveEventIDs(), t.haveEventIDs(),
) )
if err != nil { if err != nil {
fmt.Println("Failed to SendEventWithState")
return fmt.Errorf("api.SendEventWithState: %w", err) return fmt.Errorf("api.SendEventWithState: %w", err)
} }
@ -536,7 +533,6 @@ func (t *txnReq) processEventWithMissingState(ctx context.Context, e gomatrixser
for i, newEvent := range newEvents { for i, newEvent := range newEvents {
headeredNewEvents[i] = newEvent.Headered(roomVersion) headeredNewEvents[i] = newEvent.Headered(roomVersion)
} }
fmt.Println("Headered events:", len(headeredNewEvents))
if err = api.SendEvents( if err = api.SendEvents(
context.Background(), context.Background(),
t.rsAPI, t.rsAPI,
@ -546,7 +542,6 @@ func (t *txnReq) processEventWithMissingState(ctx context.Context, e gomatrixser
); err != nil { ); err != nil {
return fmt.Errorf("api.SendEvents: %w", err) return fmt.Errorf("api.SendEvents: %w", err)
} }
fmt.Println("SUCCESS!")
return nil return nil
} }