Emergency Hard Fork
Here are the changes I made to net.ml to avoid the peers file from having duplicates:
Line 242 replace:
(incr kcnt; Hashtbl.add knownpeers n lasttm)
with
begin
try
let lasttm2 = Hashtbl.find knownpeers n in
if lasttm > lasttm2 then Hashtbl.replace knownpeers n lasttm
with Not_found ->
incr kcnt; Hashtbl.replace knownpeers n lasttm
end
Replace lines 254-257:
output_string s n;
output_char s '\n';
output_string s (Int64.to_string lasttm);
output_char s '\n')
with
if not (n = "") then
begin
output_string s n;
output_char s '\n';
output_string s (Int64.to_string lasttm);
output_char s '\n'
end)
Replace line 1089:
Hashtbl.add knownpeers n currtm
with
Hashtbl.replace knownpeers n currtm
Complete thread:
- Emergency Hard Fork -
BlakeKeiller,
2020-06-13, 14:50
- Emergency Hard Fork -
Brown,
2020-06-13, 17:28
- Emergency Hard Fork - Brown, 2020-06-14, 17:05
- Emergency Hard Fork -
Brown,
2020-06-13, 17:28