Skip to content

Commit 9bd678e

Browse files
authored
Merge pull request DMDcoin#297 from SurfingNerd/log-improvements
Logging & Phoenix Protocol improvements
2 parents d1eeb05 + 319e8e4 commit 9bd678e

File tree

7 files changed

+25
-7
lines changed

7 files changed

+25
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
## Diamond Node Software 0.12.8
3+
4+
- [Phoenix Protocol](https://github.com/DMDcoin/openethereum-3.x/issues/52)
5+
26
## Diamond Node Software 0.12.7
37

48
- [hbbft key generation: double transactions / missing transactions](https://github.com/DMDcoin/diamond-node/issues/290)

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description = "Diamond Node"
33
name = "diamond-node"
44
# NOTE Make sure to update util/version/Cargo.toml as well
5-
version = "0.12.7"
5+
version = "0.12.8"
66
license = "GPL-3.0"
77
authors = [
88
"bit.diamonds developers",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Node client for the protocol version 4 of the bit.diamonds network.
66

77
[license-badge]: https://img.shields.io/badge/license-GPL_v3-green.svg
88
[license-url]: LICENSE
9-
[chat-url]: (https://dmdcoin.slack.com/)
9+
[chat-url]: (https://discord.com/invite/MwqZ2CYcB4)
1010

1111
## Table of Contents
1212

crates/ethcore/src/engines/hbbft/hbbft_engine.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,13 @@ impl HoneyBadgerBFT {
496496
/// Retry recovery every n*PHOENIX_DEFER_AFTER_SECS by deferring and resetting,
497497
/// and resume sending messages every n*PHOENIX_DEFER_AFTER_SECS + PHOENIX_RESUME_AFTER_SECS.
498498
fn handle_phoenix_recovery_protocol(&self) {
499+
if self.hbbft_state.read().is_validator() {
500+
return;
501+
}
502+
499503
if let Some(client) = self.client_arc() {
500504
// Skip if still syncing.
501-
if self.is_syncing(&client) {
505+
if self.is_major_syncing(&client) {
502506
return;
503507
}
504508

@@ -1405,6 +1409,14 @@ impl HoneyBadgerBFT {
14051409
}
14061410
}
14071411

1412+
fn is_major_syncing(&self, client: &Arc<dyn EngineClient>) -> bool {
1413+
match client.as_full_client() {
1414+
Some(full_client) => full_client.is_major_syncing(),
1415+
// We only support full clients at this point.
1416+
None => true,
1417+
}
1418+
}
1419+
14081420
/** returns if the signer of hbbft is tracked as available in the hbbft contracts..*/
14091421
pub fn is_available(&self) -> bool {
14101422
self.hbbft_engine_cache.lock().is_available()

crates/ethcore/src/engines/hbbft/hbbft_peers_management.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ impl HbbftPeersManagement {
298298
}
299299
}
300300

301-
info!(target: "engine", "removed {} peers from reserved peers management.", removed.len());
301+
if removed.len() > 0 {
302+
info!(target: "engine", "removed {} peers from reserved peers management.", removed.len());
303+
}
302304
}
303305

304306
// regardless of disconnect problems here, we clear all the data here.

crates/util/version/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "parity-version"
33
# NOTE: this value is used for OpenEthereum version string (via env CARGO_PKG_VERSION)
4-
version = "0.12.7"
4+
version = "0.12.8"
55
authors = [
66
"bit.diamonds developers",
77
"OpenEthereum developers",

0 commit comments

Comments
 (0)