Decode the transaction data from a reader.
(&mut self, r: &mut &[u8])
| 234 | |
| 235 | /// Decode the transaction data from a reader. |
| 236 | pub fn decode_tx_data(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError> { |
| 237 | let mut tx_data = Vec::new(); |
| 238 | let mut tx_types = Vec::new(); |
| 239 | |
| 240 | // Do not need the transaction data header because the RLP stream already includes the |
| 241 | // length information. |
| 242 | for _ in 0..self.total_block_tx_count { |
| 243 | let (tx_data_item, tx_type) = read_tx_data(r)?; |
| 244 | tx_data.push(tx_data_item); |
| 245 | tx_types.push(tx_type); |
| 246 | if matches!(tx_type, OpTxType::Legacy) { |
| 247 | self.legacy_tx_count += 1; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | self.tx_data = tx_data; |
| 252 | self.tx_types = tx_types; |
| 253 | |
| 254 | Ok(()) |
| 255 | } |
| 256 | |
| 257 | /// Decode the EIP-8130 auth proofs from a reader, reading one |
| 258 | /// `(sender_proof, payer_proof)` bundle for each EIP-8130 transaction in |
no test coverage detected