Skip to content

Commit

Permalink
change logged keys to string
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Sep 20, 2024
1 parent b828713 commit 59041a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/portalnetwork/src/networks/history/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class HistoryNetwork extends BaseNetwork {
public store = async (contentKey: Uint8Array, value: Uint8Array): Promise<void> => {
const contentType = contentKey[0]
const keyOpt = contentKey.slice(1)
this.logger.extend('STORE')(`Storing ${contentKey} (${value.length} bytes)`)
this.logger.extend('STORE')(`Storing ${bytesToHex(contentKey)} (${value.length} bytes)`)
switch (contentType) {
case HistoryNetworkContentType.BlockHeader: {
try {
Expand All @@ -290,7 +290,7 @@ export class HistoryNetwork extends BaseNetwork {
sszReceiptsListType.deserialize(value)
await this.put(contentKey, toHexString(value))
} catch (err: any) {
this.logger(`Received invalid bytes as receipt data for ${keyOpt}`)
this.logger(`Received invalid bytes as receipt data for ${bytesToHex(keyOpt)}`)
return
}
break
Expand Down Expand Up @@ -319,7 +319,7 @@ export class HistoryNetwork extends BaseNetwork {
// Gossip new content to network
this.gossipManager.add(keyOpt, contentType)
}
this.logger(`${HistoryNetworkContentType[contentType]} added for ${keyOpt}`)
this.logger(`${HistoryNetworkContentType[contentType]} added for ${bytesToHex(keyOpt)}`)
}

public async saveReceipts(block: Block) {
Expand Down

0 comments on commit 59041a3

Please sign in to comment.