There is a compelling logic in your question: if it's stood for 170 years, what could codes possibly have to say that is meaningful?

My cautions would include; changes in the weather, and in the use of the structure, and deterioration of foundation and timber over time. (We say a major, major change in the snow loads in NH a few years back; new numbers developed from 50 years of observation.)

All this sidesteps any notion of life-safety-health codes that the revitalized structure might reasonably be expected to meet.

Here in Live Free or Die New Hampshire, a fellow can reasonably expect to be able to build any old thing for his own use, but still be properly held to modern standards when building something for public use or sale to strangers.