public <T> T dispatchFunctionAccordingToMergeState(final Function<SwitchingObject, T> function) {
    return function.apply(mergeContext.isPostMerge() ? postMergeObject : preMergeObject);
  }
Dispatch function according to merge state t.

@param <T> the type parameter
@param function the function
@return the t
consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionUtils.java