Skip to content

Commit 3167067

Browse files
authored
Add better doc comments/warnings for TransactionWithMeta functions (anza-xyz#4827)
1 parent 81d19c0 commit 3167067

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

runtime-transaction/src/transaction_with_meta.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ use {
66
};
77

88
pub trait TransactionWithMeta: StaticMeta + SVMTransaction {
9-
// Required to interact with geyser plugins.
9+
/// Required to interact with geyser plugins.
10+
/// This function should not be used except for interacting with geyser.
11+
/// It may do numerous allocations that negatively impact performance.
1012
fn as_sanitized_transaction(&self) -> Cow<SanitizedTransaction>;
13+
/// Required to interact with several legacy interfaces that require
14+
/// `VersionedTransaction`. This should not be used unless necessary, as it
15+
/// performs numerous allocations that negatively impact performance.
1116
fn to_versioned_transaction(&self) -> VersionedTransaction;
1217
}

0 commit comments

Comments
 (0)