From ff74b86d2d166819785ea6db2809cd7a0a697994 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Mon, 6 Jun 2022 15:37:32 -0500 Subject: [PATCH] Prepare BankingStage to receive transaction indexes from PohRecorder --- poh/src/poh_recorder.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/poh/src/poh_recorder.rs b/poh/src/poh_recorder.rs index df2112b6ad588f..9d020f49a9c5d5 100644 --- a/poh/src/poh_recorder.rs +++ b/poh/src/poh_recorder.rs @@ -84,14 +84,14 @@ pub struct Record { pub mixin: Hash, pub transactions: Vec, pub slot: Slot, - pub sender: Sender>, + pub sender: Sender>>, } impl Record { pub fn new( mixin: Hash, transactions: Vec, slot: Slot, - sender: Sender>, + sender: Sender>>, ) -> Self { Self { mixin, @@ -128,7 +128,7 @@ impl TransactionRecorder { bank_slot: Slot, mixin: Hash, transactions: Vec, - ) -> Result<()> { + ) -> Result> { // create a new channel so that there is only 1 sender and when it goes out of scope, the receiver fails let (result_sender, result_receiver) = unbounded(); let res = @@ -742,7 +742,7 @@ impl PohRecorder { bank_slot: Slot, mixin: Hash, transactions: Vec, - ) -> Result<()> { + ) -> Result> { // Entries without transactions are used to track real-time passing in the ledger and // cannot be generated by `record()` assert!(!transactions.is_empty(), "No transactions provided"); @@ -787,7 +787,8 @@ impl PohRecorder { "send_poh_entry", ); self.send_entry_us += send_entry_time.as_us(); - return Ok(send_entry_res?); + send_entry_res?; + return Ok(vec![]); } // record() might fail if the next PoH hash needs to be a tick. But that's ok, tick()