Skip to content

Commit

Permalink
Add type alias to make sender docs more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Jun 22, 2022
1 parent cfa6b2d commit 853b61b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions poh/src/poh_recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,22 @@ impl BankStart {
}
}

// Sends the Result of the record operation, including the index in the slot of the first
// transaction, if being tracked by WorkingBank
type RecordResultSender = Sender<Result<Option<usize>>>;

pub struct Record {
pub mixin: Hash,
pub transactions: Vec<VersionedTransaction>,
pub slot: Slot,
pub sender: Sender<Result<Option<usize>>>, // Sends the index of `transactions.first()` in the slot, if being tracked by WorkingBank
pub sender: RecordResultSender,
}
impl Record {
pub fn new(
mixin: Hash,
transactions: Vec<VersionedTransaction>,
slot: Slot,
sender: Sender<Result<Option<usize>>>,
sender: RecordResultSender,
) -> Self {
Self {
mixin,
Expand Down

0 comments on commit 853b61b

Please sign in to comment.