nb.Storage.GetNotificationBuffer().Add(id.Round(nd.RoundID),[]*notifications.Data{nd})// TODO build lists by rid for more efficient re-insertion? Accumulator would let us do this with the other size check in swap
}
returnnil,errors.WithMessagef(err,"Could not retrieve registration for ephemeral ID %+v",ephID)
overflow=append(overflow,rest...)
csvs[i]=string(notifs)
ephemerals=append(ephemerals,i)
}
varoverflow[]*notifications.Data
iflen(data)>maxBatchSize{
overflow=data[maxBatchSize:]
data=data[:maxBatchSize]
toNotify,err:=nb.Storage.GetToNotify(ephemerals)
iferr!=nil{
returnerrors.WithMessage(err,"Failed to get list of tokens to notify")
db.GetNotificationBuffer().Add(id.Round(nd.RoundID),[]*notifications.Data{nd})// TODO build lists by rid for more efficient re-insertion? Accumulator would let us do this with the other size check in swap