Keep hp cfg and patch cfg consistent. (#216)

* Copy from hp cfg to patch cfg upon startup.
* Persist to hp cfg whenever patch cfg is updated.
This commit is contained in:
Ravin Perera
2021-01-10 17:48:12 +05:30
committed by GitHub
parent d39b9a56ec
commit 11cb57e9ee
8 changed files with 257 additions and 266 deletions

View File

@@ -263,8 +263,8 @@ namespace consensus
<< "/" << cp.input_hashes.size()
<< " ts:" << std::to_string(cp.time)
<< " lcl:" << cp.lcl.substr(0, 15)
<< " state hash:" << cp.state_hash
<< " patch hash:" << cp.patch_hash
<< " state:" << cp.state_hash
<< " patch:" << cp.patch_hash
<< " [from:" << ((cp.pubkey == conf::cfg.node.public_key) ? "self" : util::to_hex(cp.pubkey).substr(2, 10)) << "]"
<< "(" << std::to_string(cp.recv_timestamp > cp.sent_timestamp ? cp.recv_timestamp - cp.sent_timestamp : 0) << "ms)";
@@ -380,8 +380,8 @@ namespace consensus
<< "/" << p.input_hashes.size()
<< " ts:" << std::to_string(p.time)
<< " lcl:" << p.lcl.substr(0, 15)
<< " state hash:" << p.state_hash
<< " patch hash:" << p.patch_hash;
<< " state:" << p.state_hash
<< " patch:" << p.patch_hash;
}
/**