private Optional<MutableWorldState> getFullWorldState(final WorldStateQueryParams queryParams) {
    return queryParams.shouldWorldStateUpdateHead()
        ? getFullWorldStateFromHead(queryParams.getBlockHash())
        : getFullWorldStateFromCache(queryParams.getBlockHeader());
  }
Gets the full world state based on the provided query parameters.

<p>This method determines whether to retrieve the full world state from the head or from the
cache based on the query parameters. If the query parameters indicate that the world state
should update the head, the method retrieves the full world state from the head. Otherwise, it
retrieves the full world state from the cache.

<p>The method follows these steps: 1. Check if the query parameters indicate that the world
state should update the head. 2. If true, call {@link #getFullWorldStateFromHead(Hash)} with
the block hash from the query parameters. 3. If false, call {@link
#getFullWorldStateFromCache(BlockHeader)} with the block header from the query parameters.

@param queryParams the query parameters
@return the stateful world state, if available
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/common/provider/PathBasedWorldStateProvider.java