diff --git a/crates/node/src/builder.rs b/crates/node/src/builder.rs index 112e8c3..bc40efd 100644 --- a/crates/node/src/builder.rs +++ b/crates/node/src/builder.rs @@ -40,8 +40,10 @@ where .validate() .map_err(|e| PayloadBuilderError::Internal(RethError::Other(Box::new(e))))?; - // Get the latest state provider - let state_provider = self.client.latest().map_err(PayloadBuilderError::other)?; + let state_provider = self + .client + .state_by_block_hash(attributes.parent_hash) + .map_err(PayloadBuilderError::other)?; // Create a database from the state provider let db = StateProviderDatabase::new(&state_provider);