Skip to content

Commit

Permalink
Revert "[FAB-14684] log payload buff size"
Browse files Browse the repository at this point in the history
As we actually do log the payload buffer size in enough places.

This reverts commit 493dfd6.

Change-Id: I57e54975b7bcfee81e8845b2cccac0da22c09ef2
Signed-off-by: yacovm <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Mar 16, 2019
1 parent db5d24e commit c3ae466
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gossip/state/state.go
Expand Up @@ -606,7 +606,6 @@ func (s *GossipStateProviderImpl) deliverPayloads() {
payload.SeqNum, rawBlock.Header, rawBlock.Data)
continue
}
logger.Debugf("[%s] Popped block [%d] with %d remaining blocks", s.chainID, rawBlock.Header.Number, s.payloads.Size())
logger.Debugf("[%s] Transferring block [%d] with %d transaction(s) to the ledger", s.chainID, payload.SeqNum, len(rawBlock.Data.Data))

// Read all private data into slice
Expand Down Expand Up @@ -818,14 +817,12 @@ func (s *GossipStateProviderImpl) addPayload(payload *proto.Payload, blockingMod
if payload == nil {
return errors.New("Given payload is nil")
}
logger.Debugf("[%s] Adding payload to local buffer, blockNum = [%d]", s.chainID, payload.SeqNum)
height, err := s.ledger.LedgerHeight()
if err != nil {
return errors.Wrap(err, "Failed obtaining ledger height")
}

logger.Debugf("[%s] Adding payload to local buffer, blockNum = [%d], height = (%d), storing {%d} blocks",
s.chainID, payload.SeqNum, height, s.payloads.Size())

if !blockingMode && payload.SeqNum-height >= uint64(s.config.MaxBlockDistance) {
return errors.Errorf("Ledger height is at %d, cannot enqueue block with sequence of %d", height, payload.SeqNum)
}
Expand All @@ -835,7 +832,6 @@ func (s *GossipStateProviderImpl) addPayload(payload *proto.Payload, blockingMod
}

s.payloads.Push(payload)
logger.Debugf("[%s] Pushed payload [%d] to the local buffer, storing {%d} blocks", s.chainID, payload.SeqNum, s.payloads.Size())

if logger.IsEnabledFor(logging.DEBUG) {
logger.Debugf("Blocks payloads buffer size for channel [%s] is %d blocks", s.chainID, s.payloads.Size())
Expand Down

0 comments on commit c3ae466

Please sign in to comment.