Skip to content

Commit

Permalink
add a little more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoe committed Dec 7, 2024
1 parent 3e9cd45 commit fca829e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/chain/mempool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import (
"github.com/samber/lo"

"github.com/iotaledger/hive.go/logger"

consGR "github.com/iotaledger/wasp/packages/chain/cons/cons_gr"
"github.com/iotaledger/wasp/packages/chain/mempool/distsync"
"github.com/iotaledger/wasp/packages/cryptolib"
Expand Down Expand Up @@ -505,6 +506,8 @@ func (mpi *mempoolImpl) distSyncRequestReceivedCB(request isc.Request) bool {
return false
}
if err := mpi.shouldAddOffledgerRequest(offLedgerReq); err == nil {
mpi.log.Warn("shouldAddOffledgerRequest: true, trying to add to offledger %T: %+v", request, request)

return mpi.addOffledger(offLedgerReq)
}
return false
Expand Down
2 changes: 2 additions & 0 deletions packages/chain/mempool/offledger_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/iotaledger/hive.go/ds/shrinkingmap"
"github.com/iotaledger/hive.go/logger"

consGR "github.com/iotaledger/wasp/packages/chain/cons/cons_gr"
"github.com/iotaledger/wasp/packages/isc"
"github.com/iotaledger/wasp/packages/kv/codec"
Expand Down Expand Up @@ -134,6 +135,7 @@ func (p *OffLedgerPool) Add(request isc.OffLedgerRequest) bool {
deleted := p.LimitPoolSize()
if lo.Contains(deleted, entry) {
// this exact request was deleted from the pool, do not update metrics, or mark available
p.log.Debugf("NOT ADDED, was removed already. reqID: %v as key=%v, senderAccount: %v", request.ID(), ref, account)
return false
}

Expand Down

0 comments on commit fca829e

Please sign in to comment.