copernet / copernicus

An alternative implementation of the Bitcoin Cash protocol, written in Golang
https://copernet.io
BSD 2-Clause "Simplified" License
85 stars 34 forks source link

add detailed RevertToInv check; add pindexBestHeaderSent #225

Closed Radar3 closed 5 years ago

Radar3 commented 5 years ago

1, Fix issue #211, add detailed RevertToInv check. 2, Fix issue #224, send GetHeaders msg once, when pindexBestHeader is 24h near to now, which will let us know all available headers, and thus find most pow work header. 3, add support of pindexBestHeaderSent variable, which we do not implement in previous code. But this variable is needed to when fixing issue #211. 4, some old bug found and fixed.

All FT & UT run passed.

And I am testing these code on mainnet, until now everything goes well.

@whunmr please help review the code.