Skip to content

Commit 671aa6f

Browse files
[PSL-1217] (#904)
1 parent 7af2b54 commit 671aa6f

File tree

4 files changed

+10
-36
lines changed

4 files changed

+10
-36
lines changed

p2p/kademlia/store/sqlite/replication.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,32 +39,6 @@ func (n *nodeReplicationInfo) toDomain() domain.NodeReplicationInfo {
3939
}
4040
}
4141

42-
/*
43-
type repKeys struct {
44-
Key string `db:"key"`
45-
UpdatedAt time.Time `db:"updatedAt"`
46-
IP string `db:"ip"`
47-
Port int `db:"port"`
48-
ID string `db:"id"`
49-
Attempts int `db:"attempts"`
50-
}
51-
52-
func (r repKeys) toDomain() (domain.ToRepKey, error) {
53-
key, err := hex.DecodeString(r.Key)
54-
if err != nil {
55-
return domain.ToRepKey{}, fmt.Errorf("error decoding key: %w", err)
56-
}
57-
58-
return domain.ToRepKey{
59-
Key: key,
60-
UpdatedAt: r.UpdatedAt,
61-
IP: r.IP,
62-
Port: r.Port,
63-
ID: r.ID,
64-
Attempts: r.Attempts,
65-
}, nil
66-
}*/
67-
6842
func (s *Store) migrateReplication() error {
6943
replicateQuery := `
7044
CREATE TABLE IF NOT EXISTS replication_info(

supernode/services/common/storage_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
const (
2424
loadSymbolsBatchSize = 2500
2525
storeSymbolsPercent = 10
26-
concurrency = 2
26+
concurrency = 1
2727
)
2828

2929
// StorageHandler provides common logic for RQ and P2P operations

walletnode/api/services/cascade.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,16 @@ func (service *CascadeAPIHandler) getTxIDs(ctx context.Context, txID string) (tx
288288
}
289289

290290
return
291-
}
292-
} else {
293-
filename, size, err := service.download.GetFilenameAndSize(ctx, txID)
294-
if err != nil {
295-
return nil, ticket
296-
}
291+
} else {
292+
filename, size, err := service.download.GetFilenameAndSize(ctx, txID)
293+
if err != nil {
294+
return nil, ticket
295+
}
297296

298-
ticket.NameOfOriginalFile = filename
299-
ticket.SizeOfOriginalFileMB = utils.BytesIntToMB(size)
297+
ticket.NameOfOriginalFile = filename
298+
ticket.SizeOfOriginalFileMB = utils.BytesIntToMB(size)
300299

300+
}
301301
}
302302
txIDs = append(txIDs, txID)
303303

walletnode/node/grpc/download_nft.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (service *downloadNft) Download(ctx context.Context, txid, timestamp, signa
5353
}
5454
file = append(file, resp.File...)
5555
if utils.BytesIntToMB(len(file)) > init+10 {
56-
log.WithContext(ctx).WithField("total-recieved", utils.BytesIntToMB(len(file))).Info("received 10 MB file chunk")
56+
log.WithContext(ctx).WithField("total-recieved", utils.BytesIntToMB(len(file))).Debug("received 10 MB file chunk")
5757
init = init + 10
5858
}
5959
}

0 commit comments

Comments
 (0)