From 458bcdff332f5b929e2e0461a9a01546437cb50e Mon Sep 17 00:00:00 2001 From: YACOVM Date: Mon, 10 Apr 2017 01:58:01 +0300 Subject: [PATCH] [FAB-2943] Event publishing failure fails block commit The committer implementation reports an error if the publishing of a block committing event failures due to an error that is related to the eventhub server. The method shouldn't return a failure, but only log a message to the log, because if it returns failure- the state transfer module in gossip/state/state.go doesn't update its metadata. Change-Id: I134874654f1ce1453eb30939fedfa2c86c2634da Signed-off-by: Yacov Manevich --- core/committer/committer_impl.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/committer/committer_impl.go b/core/committer/committer_impl.go index 3e0a18625f6..63ab061567a 100644 --- a/core/committer/committer_impl.go +++ b/core/committer/committer_impl.go @@ -17,8 +17,6 @@ limitations under the License. package committer import ( - "fmt" - "github.com/hyperledger/fabric/core/committer/txvalidator" "github.com/hyperledger/fabric/core/ledger" "github.com/hyperledger/fabric/events/producer" @@ -65,8 +63,7 @@ func (lc *LedgerCommitter) Commit(block *common.Block) error { // send block event *after* the block has been committed if err := producer.SendProducerBlockEvent(block); err != nil { - logger.Errorf("Error sending block event %s", err) - return fmt.Errorf("Error sending block event %s", err) + logger.Errorf("Error publishing block %d, because: %v", block.Header.Number, err) } return nil