mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 12:49:23 +00:00
Outline of the transaction-chaining scheduler
This commit is contained in:
@@ -4,7 +4,7 @@ use group::GroupEncoding;
|
||||
|
||||
use serai_db::{Get, DbTxn, Db};
|
||||
|
||||
use primitives::{task::ContinuallyRan, OutputType, ReceivedOutput, Eventuality, Block};
|
||||
use primitives::{task::ContinuallyRan, OutputType, ReceivedOutput, Eventuality, Block, Payment};
|
||||
|
||||
use crate::{
|
||||
lifetime::LifetimeStage,
|
||||
@@ -12,7 +12,7 @@ use crate::{
|
||||
SeraiKey, OutputWithInInstruction, ReceiverScanData, ScannerGlobalDb, SubstrateToEventualityDb,
|
||||
ScanToEventualityDb,
|
||||
},
|
||||
BlockExt, ScannerFeed, KeyFor, OutputFor, EventualityFor, Payment, SchedulerUpdate, Scheduler,
|
||||
BlockExt, ScannerFeed, KeyFor, AddressFor, OutputFor, EventualityFor, SchedulerUpdate, Scheduler,
|
||||
sort_outputs,
|
||||
scan::{next_to_scan_for_outputs_block, queue_output_until_block},
|
||||
};
|
||||
@@ -168,7 +168,10 @@ impl<D: Db, S: ScannerFeed, Sch: Scheduler<S>> EventualityTask<D, S, Sch> {
|
||||
let new_eventualities = self.scheduler.fulfill(
|
||||
&mut txn,
|
||||
&keys_with_stages,
|
||||
burns.into_iter().filter_map(|burn| Payment::try_from(burn).ok()).collect(),
|
||||
burns
|
||||
.into_iter()
|
||||
.filter_map(|burn| Payment::<AddressFor<S>>::try_from(burn).ok())
|
||||
.collect(),
|
||||
);
|
||||
intake_eventualities::<S>(&mut txn, new_eventualities);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user