Function sentry::routes::campaign::insert_events::spend_for_events
source · pub async fn spend_for_events<C: Locked + 'static>(
app: &Application<C>,
campaign: &Campaign,
events: Vec<Event>,
session: &Session,
leader: &ValidatorDesc,
follower: &ValidatorDesc
) -> Result<Vec<(Event, Address, UnifiedNum)>, Error>
Expand description
This function calculates the fee for each validator and each Event
.
It then spends the given amounts for:
- [
Event
]Publisher
- for payout Leader
andFollower
- for validator fees