Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet Release Fixes #1 #533

Merged
merged 1 commit into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public IActionResult GetBlock([FromQuery] SearchByHashRequest query)
if (this.network.Consensus.IsProofOfStake)
{
var posBlock = block as PosBlock;

blockModel.PosBlockSignature = posBlock.BlockSignature.ToHex(this.network);
blockModel.PosBlockTrust = new Target(chainedHeader.GetBlockTarget()).ToUInt256().ToString();
blockModel.PosChainTrust = chainedHeader.ChainWork.ToString(); // this should be similar to ChainWork
Expand All @@ -158,7 +158,7 @@ public IActionResult GetBlock([FromQuery] SearchByHashRequest query)

blockModel.PosModifierv2 = blockStake?.StakeModifierV2.ToString();
blockModel.PosFlags = blockStake?.Flags == BlockFlag.BLOCK_PROOF_OF_STAKE ? "proof-of-stake" : "proof-of-work";
blockModel.PosHashProof = blockStake?.HashProof.ToString();
blockModel.PosHashProof = blockStake?.HashProof?.ToString();
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Stratis.Bitcoin/Builder/FullNodeFeatureExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ private void LogAndAddException(IFullNodeFeature feature, bool disposing, List<E
exceptions.Add(exception);

var messageText = disposing ? "disposing" : "starting";
var exceptionText = $"An error occurred {messageText} full node feature '{feature.GetType().Name}': '{exception}'";
var exceptionText = "An error occurred {0} full node feature '{1}' : '{2}'";

this.logger.Error(exceptionText);
this.signals.Publish(new FullNodeEvent() { Message = exceptionText, State = FullNodeState.Failed.ToString() });
this.logger.Error(exceptionText, messageText, feature.GetType().Name, exception);
this.signals.Publish(new FullNodeEvent() { Message = string.Format(exceptionText, messageText, feature.GetType().Name, exception.Message), State = FullNodeState.Failed.ToString() });
}
}
}