[T4] Secondary proof of work difficulty adjustments (#1709)

* First pass at secondary proof of work difficulty adjustments
* Core and chain test fixes
* Next difficulty calc now needs a height. Scaling calculation fixes. Setting scaling on mined block.
* Change factor to u32 instead of u64.
* Cleanup structs used by next_difficulty
* Fix header size calc with u32 scaling
This commit is contained in:
Ignotus Peverell
2018-10-13 13:57:01 -07:00
committed by GitHub
parent e9f62b74d5
commit 43f4f92730
21 changed files with 376 additions and 301 deletions
+4 -5
View File
@@ -166,11 +166,10 @@ impl ServerConfig {
// check [server.p2p_config.capabilities] with 'archive_mode' in [server]
if let Some(archive) = self.archive_mode {
// note: slog not available before config loaded, only print here.
if archive
!= self
.p2p_config
.capabilities
.contains(p2p::Capabilities::FULL_HIST)
if archive != self
.p2p_config
.capabilities
.contains(p2p::Capabilities::FULL_HIST)
{
// if conflict, 'archive_mode' win
self.p2p_config