Skip to content

Commit

Permalink
Revert "add log when exception happens under debug mode (#686)" (#689)
Browse files Browse the repository at this point in the history
This reverts commit 7b661e5.
  • Loading branch information
superboyiii authored Feb 8, 2022
1 parent 7b661e5 commit 32aacc4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/DBFTPlugin/Consensus/ConsensusContext.MakePayload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ private void SignPayload(ExtensiblePayload payload)
sc = new ContractParametersContext(neoSystem.StoreView, payload, dbftSettings.Network);
wallet.Sign(sc);
}
catch (InvalidOperationException exception)
catch (InvalidOperationException)
{
Utility.Log(nameof(ConsensusContext), LogLevel.Debug, exception.ToString());
return;
}
payload.Witness = sc.GetWitnesses()[0];
Expand Down
3 changes: 1 addition & 2 deletions src/DBFTPlugin/Consensus/ConsensusContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ public bool Load()
{
Deserialize(reader);
}
catch (Exception exception)
catch
{
Utility.Log(nameof(ConsensusContext), LogLevel.Debug, exception.ToString());
return false;
}
return true;
Expand Down
8 changes: 5 additions & 3 deletions src/DBFTPlugin/Consensus/ConsensusService.OnMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ private void OnConsensusPayload(ExtensiblePayload payload)
{
message = context.GetMessage(payload);
}
catch (Exception ex)
catch (FormatException)
{
return;
}
catch (IOException)
{
Utility.Log(nameof(ConsensusService), LogLevel.Debug, ex.ToString());
return;
}

if (!message.Verify(neoSystem.Settings)) return;
if (message.BlockIndex != context.Block.Index)
{
Expand Down

0 comments on commit 32aacc4

Please sign in to comment.