To prevent the walnuts from turning a little black inside the baked cake, try lightly coating them in a small amount of flour, then shaking in a strainer to remove the excess flour before mixing through the batter. The vinegar and baking soda can cause a reaction that discolours the nuts. The flour acts as a barrier to prevent blackening.