fn push_ticket_face_value<G>(
graph: &G,
ticket_price: &Arc<RwLock<HoprBalance>>,
win_probability: &Arc<RwLock<WinningProbability>>,
)where
G: NetworkGraphUpdate,Expand description
Recomputes the single-hop ticket face value and pushes it into the graph.
price / win_probability is the amount that makes the expected payout per packet equal the
ticket price, i.e. one ticket’s face value. Edges store only a balance, so this is the one place
pricing enters path selection — and a change costs a single write rather than an edge sweep.