Rebuilt 340 knocking sound
Try not to buy used rebuilt motors from unknown sources. Especially not local. And if so, look for documentation of what was done with pictures and measurements. Having video of it already running on an engine stand is a big plus too. And running it gets a lot (not 100%) of the cam going flat issues out of the way.
Now it's a he said - she said deal. Maybe you didn't break it in right, maybe seller got a bad part, etc, etc. The current damage could be masking old reused parts or bad clearances... But can't tell now.