diff --git a/p2p/kademlia/store/sqlite/replication.go b/p2p/kademlia/store/sqlite/replication.go index 41f09a6fd..85ccce6d3 100644 --- a/p2p/kademlia/store/sqlite/replication.go +++ b/p2p/kademlia/store/sqlite/replication.go @@ -39,32 +39,6 @@ func (n *nodeReplicationInfo) toDomain() domain.NodeReplicationInfo { } } -/* -type repKeys struct { - Key string `db:"key"` - UpdatedAt time.Time `db:"updatedAt"` - IP string `db:"ip"` - Port int `db:"port"` - ID string `db:"id"` - Attempts int `db:"attempts"` -} - -func (r repKeys) toDomain() (domain.ToRepKey, error) { - key, err := hex.DecodeString(r.Key) - if err != nil { - return domain.ToRepKey{}, fmt.Errorf("error decoding key: %w", err) - } - - return domain.ToRepKey{ - Key: key, - UpdatedAt: r.UpdatedAt, - IP: r.IP, - Port: r.Port, - ID: r.ID, - Attempts: r.Attempts, - }, nil -}*/ - func (s *Store) migrateReplication() error { replicateQuery := ` CREATE TABLE IF NOT EXISTS replication_info( diff --git a/supernode/services/common/storage_handler.go b/supernode/services/common/storage_handler.go index 103518b8d..01a6a318c 100644 --- a/supernode/services/common/storage_handler.go +++ b/supernode/services/common/storage_handler.go @@ -23,7 +23,7 @@ import ( const ( loadSymbolsBatchSize = 2500 storeSymbolsPercent = 10 - concurrency = 2 + concurrency = 1 ) // StorageHandler provides common logic for RQ and P2P operations diff --git a/walletnode/api/services/cascade.go b/walletnode/api/services/cascade.go index 6b2deb0ef..949f68697 100644 --- a/walletnode/api/services/cascade.go +++ b/walletnode/api/services/cascade.go @@ -288,16 +288,16 @@ func (service *CascadeAPIHandler) getTxIDs(ctx context.Context, txID string) (tx } return - } - } else { - filename, size, err := service.download.GetFilenameAndSize(ctx, txID) - if err != nil { - return nil, ticket - } + } else { + filename, size, err := service.download.GetFilenameAndSize(ctx, txID) + if err != nil { + return nil, ticket + } - ticket.NameOfOriginalFile = filename - ticket.SizeOfOriginalFileMB = utils.BytesIntToMB(size) + ticket.NameOfOriginalFile = filename + ticket.SizeOfOriginalFileMB = utils.BytesIntToMB(size) + } } txIDs = append(txIDs, txID) diff --git a/walletnode/node/grpc/download_nft.go b/walletnode/node/grpc/download_nft.go index b472e6d06..cfb257fae 100644 --- a/walletnode/node/grpc/download_nft.go +++ b/walletnode/node/grpc/download_nft.go @@ -53,7 +53,7 @@ func (service *downloadNft) Download(ctx context.Context, txid, timestamp, signa } file = append(file, resp.File...) if utils.BytesIntToMB(len(file)) > init+10 { - log.WithContext(ctx).WithField("total-recieved", utils.BytesIntToMB(len(file))).Info("received 10 MB file chunk") + log.WithContext(ctx).WithField("total-recieved", utils.BytesIntToMB(len(file))).Debug("received 10 MB file chunk") init = init + 10 } }