Skip to content

Commit

Permalink
log execution errors at right level, stops transition message propaga…
Browse files Browse the repository at this point in the history
…tion post-merge sync. (hyperledger#4104)

Signed-off-by: Justin Florentine <justin+github@florentine.us>

Co-authored-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Cody Born <codyborn@outlook.com>
  • Loading branch information
2 people authored and codyborn committed Jul 31, 2022
1 parent 5b41dcf commit 0a65802
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public PostMergeContext setTerminalTotalDifficulty(final Difficulty newTerminalT

@Override
public void setIsPostMerge(final Difficulty totalDifficulty) {
if (isPostMerge.get().orElse(Boolean.FALSE) && lastFinalized.get() != null) {
if (isPostMerge.get().orElse(Boolean.FALSE)) {
// if we have finalized, we never switch back to a pre-merge once we have transitioned
// post-TTD.
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public final JsonRpcResponse response(final JsonRpcRequestContext request) {
cf.complete(
resp.otherwise(
t -> {
LOG.debug(
LOG.error(
String.format("failed to exec consensus method %s", this.getName()),
t);
return new JsonRpcErrorResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ private String toLogString(final Collection<NewBlockHash> newBlockHashs) {
}

private void reactToTTDReachedEvent(final boolean ttdReached) {
if (ttdReached) {
if (started.get() && ttdReached) {
LOG.info("Block propagation was running, then ttd reached, stopping");
stop();
} else if (!started.get()) {
start();
Expand Down

0 comments on commit 0a65802

Please sign in to comment.