Skip to content

Commit

Permalink
monorepo: type cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrocheleau committed Aug 12, 2024
1 parent 45e0a6d commit 6004f60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/blockchain/src/consensus/ethash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class EthashConsensus implements Consensus {
public async genesisInit(): Promise<void> {}
public async setup({ blockchain }: ConsensusOptions): Promise<void> {
this.blockchain = blockchain
this._ethash.cacheDB = this.blockchain!.db as any
this._ethash.cacheDB = this.blockchain.db
}
public async newBlock(): Promise<void> {}
}
3 changes: 1 addition & 2 deletions packages/client/src/rpc/modules/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ export class Admin {
return peers?.map((peer) => {
return {
id: peer.id,
// Typescript complains about the typing of `_hello` if we make rlpxPeer possibly null
name: (peer.rlpxPeer as any)['_hello'].clientId ?? null,
name: peer.rlpxPeer?.['_hello']?.clientId ?? null,
protocols: {
eth: {
head: peer.eth?.updatedBestHeader
Expand Down

0 comments on commit 6004f60

Please sign in to comment.