public NonceProvider getNonceProvider(final WorldState worldState) {
    final HashMap<Address, Long> currentNonceValues = new HashMap<>();
    return (Address address) ->
        currentNonceValues.compute(
            address,
            (addr, currentValue) -> {
              if (currentValue == null) {
                return Optional.ofNullable(worldState.get(address))
                    .map(Account::getNonce)
                    .orElse(0L);
              }
              return currentValue + 1;
            });
  }
Gets nonce provider.

@param worldState the world state
@return the nonce provider
app/src/main/java/org/hyperledger/besu/chainimport/internal/BlockData.java