chore_: fix defer logs
This commit is contained in:
parent
c5c291ac5a
commit
b36ddda6ed
|
@ -3445,8 +3445,9 @@ func (m *Messenger) SyncVerificationRequest(ctx context.Context, vr *verificatio
|
|||
// MessengerResponse to the client
|
||||
func (m *Messenger) RetrieveAll() (*MessengerResponse, error) {
|
||||
m.logger.Debug("RetrieveAll start")
|
||||
defer m.logger.Debug("RetrieveAll end")
|
||||
|
||||
chatWithMessages, err := m.transport.RetrieveRawAll()
|
||||
m.logger.Debug("RetrieveAll end", zap.Any("chatWithMessages", chatWithMessages))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -3900,7 +3901,13 @@ func (m *Messenger) handleImportedMessages(messagesToHandle map[transport.Filter
|
|||
return nil
|
||||
}
|
||||
|
||||
var handleRetrievedMessagesCounter = atomic.NewInt32(0)
|
||||
|
||||
func (m *Messenger) handleRetrievedMessages(chatWithMessages map[transport.Filter][]*types.Message, storeWakuMessages bool, fromArchive bool) (*MessengerResponse, error) {
|
||||
counter := handleRetrievedMessagesCounter.Inc()
|
||||
|
||||
m.logger.Debug("handleRetrievedMessages start", zap.Int32("counter", counter))
|
||||
defer m.logger.Debug("handleRetrievedMessages end", zap.Int32("counter", counter))
|
||||
|
||||
m.handleMessagesMutex.Lock()
|
||||
defer m.handleMessagesMutex.Unlock()
|
||||
|
|
|
@ -17,6 +17,7 @@ import (
|
|||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/status-im/status-go/connection"
|
||||
"github.com/status-im/status-go/eth-node/crypto"
|
||||
"github.com/status-im/status-go/eth-node/types"
|
||||
|
@ -223,6 +224,9 @@ func (t *Transport) GetStats() types.StatsSummary {
|
|||
}
|
||||
|
||||
func (t *Transport) RetrieveRawAll() (map[Filter][]*types.Message, error) {
|
||||
t.logger.Debug("RetrieveRawAll start")
|
||||
defer t.logger.Debug("RetrieveRawAll end")
|
||||
|
||||
result := make(map[Filter][]*types.Message)
|
||||
logger := t.logger.With(zap.String("site", "retrieveRawAll"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue