From cd6134c49309faf965936784c749a8860176828f Mon Sep 17 00:00:00 2001 From: Peng Rong Date: Mon, 26 Nov 2018 21:17:16 +0800 Subject: [PATCH] Add log for Incorrect merkle trees --- .../BlockExecution/BlockExecutor.cs | 19 ++++++++++++------- .../BlockSynchronization/BlockSynchronizer.cs | 3 +-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/AElf.Synchronization/BlockExecution/BlockExecutor.cs b/AElf.Synchronization/BlockExecution/BlockExecutor.cs index c99d9edfc6..f26c0be3b8 100644 --- a/AElf.Synchronization/BlockExecution/BlockExecutor.cs +++ b/AElf.Synchronization/BlockExecution/BlockExecutor.cs @@ -146,12 +146,6 @@ public async Task ExecuteBlock(IBlock block) txnRes = await ExecuteTransactions(readyTxs, block.Header.ChainId, block.Header.GetDisambiguationHash()); txnRes = SortToOriginalOrder(txnRes, readyTxs); - _logger?.Trace("Transaction Results:"); - foreach (var re in txnRes) - { - _logger?.Trace(re.StateHash.DumpHex); - } - var blockChain = _chainService.GetBlockChain(Hash.LoadHex(ChainConfig.Instance.ChainId)); if (await blockChain.GetBlockByHashAsync(block.GetHash()) != null) { @@ -224,7 +218,7 @@ private async Task> ExecuteTransactions(List> ExecuteTransactions(List x.GetHash() == trace.TransactionId)}" + + $"\n {trace.StdErr}"); } results.Add(res); @@ -389,6 +386,14 @@ private BlockExecutionResult UpdateWorldState(IBlock block, IEnumerable HandleValidBlock(IBlock block) { - _logger?.Warn( - $"Valid block {block.BlockHashToHex}. Height: *{block.Index}*"); + _logger?.Info($"Valid block {block.BlockHashToHex}. Height: *{block.Index}*"); if (_stateFSM.CurrentState != (int) NodeState.BlockExecuting) {