Skip to content

Commit

Permalink
outbound-governor: randomness
Browse files Browse the repository at this point in the history
When outbound governor timeouts, we need have to update the `stdGen`
available in the outbound governor, so next time it has a chance to make
a different decision (known peers decisions use random selection between
light peer sharing (aka inbound peers) and peer sharing).
  • Loading branch information
coot committed May 7, 2024
1 parent 1e14c75 commit 3cecb62
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,6 @@ wakeupDecision :: PeerSelectionState peeraddr peerconn
wakeupDecision st _now =
Decision {
decisionTrace = [TraceGovernorWakeup],
decisionState = st,
decisionState = st { stdGen = fst (split (stdGen st)) } ,
decisionJobs = []
}

0 comments on commit 3cecb62

Please sign in to comment.