Collect the identifiers of the transactions in the block.
(block: &Block, chain_id: &ChainID)
| 150 | |
| 151 | /// Collect the identifiers of the transactions in the block. |
| 152 | fn collect_txs(block: &Block, chain_id: &ChainID) -> Vec<(et::TxHash, Address, Nonce)> { |
| 153 | let mut txs = Vec::new(); |
| 154 | for tx in &block.data { |
| 155 | if let Ok(ChainMessage::Signed(msg)) = fvm_ipld_encoding::from_slice(tx) { |
| 156 | if let Ok(Some(DomainHash::Eth(h))) = msg.domain_hash(chain_id) { |
| 157 | txs.push((et::TxHash::from(h), msg.message.from, msg.message.sequence)) |
| 158 | } |
| 159 | } |
| 160 | } |
| 161 | txs |
| 162 | } |
| 163 | |
| 164 | /// Fetch the chain ID from the API; do it in a loop until it succeeds. |
| 165 | async fn get_chain_id(client: &FendermintClient<HybridClient>) -> ChainID { |
no test coverage detected