Skip to content

Commit

Permalink
Temporarily remove browser client from workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Aug 10, 2023
1 parent 7418223 commit 4f16c8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"workspaces": [
"./packages/portalnetwork",
"./packages/cli",
"./packages/browser-client",
"./packages/proxy"
],
"engines": {
Expand Down
10 changes: 5 additions & 5 deletions packages/browser-client/src/peerActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,26 @@ export class PeerActions {
sendFindContent = async (type: string, enr: string) => {
if (type === 'header') {
const headerContentId = fromHexString(
getContentKey(ContentType.BlockHeader, Buffer.from(fromHexString(this.state.blockHash)))
getContentKey(ContentType.BlockHeader, fromHexString(this.state.blockHash)),
)
const header = await this.historyProtocol.sendFindContent(
ENR.decodeTxt(enr).nodeId,
headerContentId
headerContentId,
)
const block = reassembleBlock(header!.value as Uint8Array, undefined)
return block //
} else if (type === 'body') {
const headerContentKey = fromHexString(
getContentKey(ContentType.BlockHeader, Buffer.from(fromHexString(this.state.blockHash)))
getContentKey(ContentType.BlockHeader, fromHexString(this.state.blockHash)),
)
this.historyProtocol!.sendFindContent(ENR.decodeTxt(enr).nodeId, headerContentKey)
const bodyContentKey = fromHexString(
getContentKey(ContentType.BlockBody, Buffer.from(fromHexString(this.state.blockHash)))
getContentKey(ContentType.BlockBody, fromHexString(this.state.blockHash)),
)
this.historyProtocol!.sendFindContent(ENR.decodeTxt(enr).nodeId, bodyContentKey)
} else if (type === 'epoch') {
const epochContentKey = fromHexString(
getContentKey(ContentType.EpochAccumulator, epochRootByIndex(this.state.epoch))
getContentKey(ContentType.EpochAccumulator, epochRootByIndex(this.state.epoch)),
)
this.historyProtocol!.sendFindContent(ENR.decodeTxt(enr).nodeId, epochContentKey)
}
Expand Down

0 comments on commit 4f16c8f

Please sign in to comment.