Check whether an account has non-empty code deployed. Returns `true` if the account exists and has code, `false` otherwise.
(&self, address: Address)
| 302 | /// |
| 303 | /// Returns `true` if the account exists and has code, `false` otherwise. |
| 304 | pub fn has_code(&self, address: Address) -> bool { |
| 305 | let inner = self.inner.lock().expect("engine client lock"); |
| 306 | let provider = |
| 307 | inner.blockchain_provider.latest().expect("failed to get latest state provider"); |
| 308 | provider |
| 309 | .account_code(&address) |
| 310 | .expect("failed to read account code") |
| 311 | .is_some_and(|c: reth_primitives_traits::Bytecode| !c.is_empty()) |
| 312 | } |
| 313 | |
| 314 | /// Build a block from the given `BasePayloadAttributes`, returning the `BaseBuiltPayload`. |
| 315 | fn build_payload( |