Check whether an account has non-empty code deployed. Returns `true` if the account exists and has code, `false` otherwise.
(&self, address: Address)
| 354 | /// |
| 355 | /// Returns `true` if the account exists and has code, `false` otherwise. |
| 356 | pub fn has_code(&self, address: Address) -> bool { |
| 357 | let inner = self.inner.lock().expect("engine client lock"); |
| 358 | let provider = |
| 359 | inner.blockchain_provider.latest().expect("failed to get latest state provider"); |
| 360 | provider |
| 361 | .account_code(&address) |
| 362 | .expect("failed to read account code") |
| 363 | .is_some_and(|c: reth_primitives_traits::Bytecode| !c.is_empty()) |
| 364 | } |
| 365 | |
| 366 | /// Build a block from the given `BasePayloadAttributes`, returning the `BaseBuiltPayload`. |
| 367 | fn build_payload( |