File tree 2 files changed +10
-3
lines changed
crates/block-producer/src
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,14 @@ impl AuthenticatedTransaction {
99
99
self . inner . output_notes ( ) . iter ( ) . map ( |note| note. id ( ) )
100
100
}
101
101
102
+ pub fn output_note_count ( & self ) -> usize {
103
+ self . inner . output_notes ( ) . num_notes ( )
104
+ }
105
+
106
+ pub fn input_note_count ( & self ) -> usize {
107
+ self . inner . input_notes ( ) . num_notes ( )
108
+ }
109
+
102
110
/// Notes which were unauthenticate in the transaction __and__ which were
103
111
/// not authenticated by the store inputs.
104
112
pub fn unauthenticated_notes ( & self ) -> impl Iterator < Item = NoteId > + ' _ {
Original file line number Diff line number Diff line change @@ -136,9 +136,8 @@ impl BatchBudget {
136
136
let _: miden_objects:: accounts:: AccountId = tx. account_update ( ) . account_id ( ) ;
137
137
const ACCOUNT_UPDATES_PER_TX : usize = 1 ;
138
138
139
- // TODO: This is inefficient and ProvenTransaction should provide len() access.
140
- let output_notes = tx. output_notes ( ) . count ( ) ;
141
- let input_notes = tx. nullifiers ( ) . count ( ) ;
139
+ let output_notes = tx. output_note_count ( ) ;
140
+ let input_notes = tx. input_note_count ( ) ;
142
141
143
142
if self . transactions == 0
144
143
|| self . accounts < ACCOUNT_UPDATES_PER_TX
You can’t perform that action at this time.
0 commit comments