Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariel Melendez committed Dec 26, 2024
2 parents 4012246 + 73eb542 commit a1c383f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1926,7 +1926,18 @@ addEventingHandler(
function(msg)
local epochIndex = msg.Tags["Epoch-Index"] and tonumber(msg.Tags["Epoch-Index"])
or epochs.getEpochIndexForTimestamp(msg.Timestamp)
local prescribedObserversWithWeights = epochs.getPrescribedObserversWithWeightsForEpoch(epochIndex)
local epoch = epochs.getEpoch(epochIndex)
local prescribedObserversWithWeights
-- TODO: this is to support old epochs that have full array of prescribedObservers, we can remove after the new epochs are created
if
epoch.prescribedObservers
and epoch.prescribedObservers[1]
and epoch.prescribedObservers[1].gatewayAddress
then
prescribedObserversWithWeights = epoch.prescribedObservers
else
prescribedObserversWithWeights = epochs.getPrescribedObserversWithWeightsForEpoch(epochIndex)
end
Send(msg, {
Target = msg.From,
Action = "Prescribed-Observers-Notice",
Expand Down

0 comments on commit a1c383f

Please sign in to comment.