@@ -31,7 +31,6 @@ pub struct TransactionTracker {
3131 local_time : Timestamp ,
3232 /// The index of the current transaction in the block.
3333 transaction_index : u32 ,
34- next_message_index : u32 ,
3534 next_application_index : u32 ,
3635 next_chain_index : u32 ,
3736 /// Events recorded by contracts' `emit` calls.
@@ -57,7 +56,6 @@ pub struct TransactionOutcome {
5756 pub oracle_responses : Vec < OracleResponse > ,
5857 #[ debug( skip_if = Vec :: is_empty) ]
5958 pub outgoing_messages : Vec < OutgoingMessage > ,
60- pub next_message_index : u32 ,
6159 pub next_application_index : u32 ,
6260 pub next_chain_index : u32 ,
6361 /// Events recorded by contracts' `emit` calls.
@@ -74,15 +72,13 @@ impl TransactionTracker {
7472 pub fn new (
7573 local_time : Timestamp ,
7674 transaction_index : u32 ,
77- next_message_index : u32 ,
7875 next_application_index : u32 ,
7976 next_chain_index : u32 ,
8077 oracle_responses : Option < Vec < OracleResponse > > ,
8178 ) -> Self {
8279 TransactionTracker {
8380 local_time,
8481 transaction_index,
85- next_message_index,
8682 next_application_index,
8783 next_chain_index,
8884 replaying_oracle_responses : oracle_responses. map ( Vec :: into_iter) ,
@@ -107,10 +103,6 @@ impl TransactionTracker {
107103 self . transaction_index
108104 }
109105
110- pub fn next_message_index ( & self ) -> u32 {
111- self . next_message_index
112- }
113-
114106 pub fn next_application_index ( & mut self ) -> u32 {
115107 let index = self . next_application_index ;
116108 self . next_application_index += 1 ;
@@ -127,10 +119,6 @@ impl TransactionTracker {
127119 & mut self ,
128120 message : OutgoingMessage ,
129121 ) -> Result < ( ) , ArithmeticError > {
130- self . next_message_index = self
131- . next_message_index
132- . checked_add ( 1 )
133- . ok_or ( ArithmeticError :: Overflow ) ?;
134122 self . outgoing_messages . push ( message) ;
135123 Ok ( ( ) )
136124 }
@@ -274,7 +262,6 @@ impl TransactionTracker {
274262 outgoing_messages,
275263 local_time : _,
276264 transaction_index : _,
277- next_message_index,
278265 next_application_index,
279266 next_chain_index,
280267 events,
@@ -296,7 +283,6 @@ impl TransactionTracker {
296283 Ok ( TransactionOutcome {
297284 outgoing_messages,
298285 oracle_responses,
299- next_message_index,
300286 next_application_index,
301287 next_chain_index,
302288 events,
@@ -312,7 +298,7 @@ impl TransactionTracker {
312298 /// Creates a new [`TransactionTracker`] for testing, with default values and the given
313299 /// oracle responses.
314300 pub fn new_replaying ( oracle_responses : Vec < OracleResponse > ) -> Self {
315- TransactionTracker :: new ( Timestamp :: from ( 0 ) , 0 , 0 , 0 , 0 , Some ( oracle_responses) )
301+ TransactionTracker :: new ( Timestamp :: from ( 0 ) , 0 , 0 , 0 , Some ( oracle_responses) )
316302 }
317303
318304 /// Creates a new [`TransactionTracker`] for testing, with default values and oracle responses
0 commit comments