fuzz: fix bug in p2p_headers_presync harness
The calculation for the test chain's work (total_work
) should be outside of the loop. Previously, total_work
was being miscalculated due to multiple additions of work from the same headers. Now, each header's work is only counted once, providing an accurate total.