you won't get a leak from water hammer.
did you shut the stopcock to change the toilet valve ?
you can sometimes try shutting the stopcock slightly
but don't over do it or you'll start reducing the flow.
water hammer is pressure related and if that don't cure it fit a water hammer arrestor.
hi-spec plumbing & heating (essex)
March 2010