pub enum DiscoveryFilter {
ProgramExecuted(Address),
OracleUpdate {
programs: BTreeSet<Address>,
accounts: BTreeSet<Address>,
},
ProgramWrite {
program: Address,
accounts: BTreeSet<Address>,
},
}Expand description
A filter registered at session creation describing which upcoming batches
the session should announce ahead of execution via
BacktestResponse::DiscoveryBatch (and its session-event twins). Each
filter describes an event of interest (e.g. a specific program executing);
the session “discovers” the batch in which that event will occur and
emits a DiscoveryBatch so the client can pause immediately before it.
Variants§
ProgramExecuted(Address)
Discover batches containing a transaction that invokes this program.
OracleUpdate
Discover batches containing a market maker’s write to its pricing state: a transaction
that invokes one of programs, moves no token balance and, unless accounts is empty,
writes one of accounts. Besides price updates this also matches the maker’s other
token-free writes, such as configuration.
Fields
ProgramWrite
Discover batches containing a transaction that invokes program and writes one of
accounts, so an empty set matches nothing. A write through a lookup table whose addresses
did not resolve counts, as for Self::OracleUpdate.