Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions core/did.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func (c *Core) GetPeerFromExplorer(didStr string) (*wallet.DIDPeerMap, error) {
return nil, fmt.Errorf("failed to read explorer response: %w", err)
}

c.log.Debug("Explorer raw response", "body", string(body))

// First, parse basic structure
var genericResp struct {
Expand Down Expand Up @@ -636,7 +635,7 @@ func (c *Core) removeStaleDIDFromNetwork(reqID, staleDID string) (model.BasicRes
accInfo.PinnedRBT == 0 {

// DID has no tokens, safe to delete
c.log.Debug("*******did has no balance, safe to delete")

} else {
errMsg := fmt.Sprintf(
"cannot remove DID: %v, holds RBT [%f free, %f locked, %f pledged, %f pinned]",
Expand Down
9 changes: 4 additions & 5 deletions core/ft.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ func (c *Core) createFTs(reqID string, FTName string, numFTs int, numWholeTokens
c.log.Error("FT creation failed, failed to add token block", "err", err)
return err
}
c.log.Debug("burnt token block added ")

wholeTokens[i].TokenStatus = wallet.TokenIsBurntForFT
err = c.w.UpdateToken(&wholeTokens[i])
if err != nil {
c.log.Error("FT token creation failed, failed to update token status", "err", err)
return err
}
c.log.Debug("burnt token block status updated ")

release = false

// publish the burnt block in the network with topic : rubix_txns
Expand All @@ -332,7 +332,7 @@ func (c *Core) createFTs(reqID string, FTName string, numFTs int, numWholeTokens
c.log.Error("Failed to publish txn", "err", err)
return err
}
c.log.Debug("burnt token block published ")

}

// --- Batch Write FTs to Storage using WriteBatch ---
Expand All @@ -349,7 +349,7 @@ func (c *Core) createFTs(reqID string, FTName string, numFTs int, numWholeTokens
}
FTOwner := blk.GetOwner()
newFTs[i].CreatorDID = FTOwner
c.log.Debug("adding new ft to table with count ", i)

}
batch = append(batch, &newFTs[i])
}
Expand Down Expand Up @@ -404,7 +404,6 @@ func (c *Core) createFTs(reqID string, FTName string, numFTs int, numWholeTokens
return err
}

c.log.Debug("updating ft table with new fts")

updateFTTableErr := c.updateFTTable()
if updateFTTableErr != nil {
Expand Down
2 changes: 1 addition & 1 deletion core/pledge_finality_parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

// parallelQuorumPledgeFinality processes pledge finality updates in parallel
func (c *Core) parallelQuorumPledgeFinality(cr *ConensusRequest, newBlock *block.Block, newTokenStateHashes []string, transactionId string) error {
c.log.Debug("Proceeding for pledge finality (parallel)")

c.qlock.Lock()
pd, ok1 := c.pd[cr.ReqID]
cs, ok2 := c.quorumRequest[cr.ReqID]
Expand Down
6 changes: 3 additions & 3 deletions core/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ func (c *Core) SubscribeToTokenChainDetails() error {
eventCh := make(chan model.TokenChainDetailsEvent, subscriberBufferSize)
// Start workers
for i := 0; i < workerCount; i++ {
go c.tokenDetailWorker(eventCh, i)
go c.tokenDetailWorker(eventCh)
}

return c.ps.SubscribeTopic("token_chain_details", func(peerID, topic string, data []byte) {
Expand Down Expand Up @@ -618,7 +618,7 @@ func (c *Core) SubscribeToTokenChainDetails() error {
}

// Dedicated worker for batch processing
func (c *Core) tokenDetailWorker(eventCh <-chan model.TokenChainDetailsEvent, workerNum int) {
func (c *Core) tokenDetailWorker(eventCh <-chan model.TokenChainDetailsEvent) {
for event := range eventCh {
c.processReceivedTokenDetails(event)
}
Expand Down Expand Up @@ -1335,7 +1335,7 @@ func (c *Core) syncMissingBlocks(p *ipfsport.Peer, tokenSyncInfo TokenSyncInfo)
}

if minMissingBlockId == "" && maxMissingblockId == "" {
c.log.Debug("token chain is completely synced")
// c.log.Debug("token chain is completely synced")
// update token sync status
err = c.w.UpdateTokenSyncStatus(tokenSyncInfo.TokenID, wallet.SyncCompleted)
if err != nil {
Expand Down
Loading