Skip to content

Commit

Permalink
chore: further rebase fixes to unstable
Browse files Browse the repository at this point in the history
lint fixes
  • Loading branch information
g11tech committed Aug 9, 2024
1 parent e88a1e3 commit 72b8074
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 52 deletions.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/api/impl/beacon/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export function getBeaconBlockApi({
chain.logger.debug("Reconstructing signedBlockOrContents", {slot, blockRoot, source});

const contents = executionPayload
? (chain.producedContentsCache.get(toHex(executionPayload.blockHash)) ?? null)
? chain.producedContentsCache.get(toHex(executionPayload.blockHash)) ?? null
: null;
const signedBlockOrContents = reconstructFullBlockOrContents(signedBlindedBlock, {executionPayload, contents});

Expand Down
10 changes: 2 additions & 8 deletions packages/beacon-node/src/chain/blocks/importBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,18 +409,12 @@ export async function importBlock(
}
if (this.emitter.listenerCount(routes.events.EventType.attestation)) {
for (const attestation of block.message.body.attestations) {
this.emitter.emit(routes.events.EventType.attestation, {
version: this.config.getForkName(blockSlot),
data: attestation,
});
this.emitter.emit(routes.events.EventType.attestation, attestation);
}
}
if (this.emitter.listenerCount(routes.events.EventType.attesterSlashing)) {
for (const attesterSlashing of block.message.body.attesterSlashings) {
this.emitter.emit(routes.events.EventType.attesterSlashing, {
version: this.config.getForkName(blockSlot),
data: attesterSlashing,
});
this.emitter.emit(routes.events.EventType.attesterSlashing, attesterSlashing);
}
}
if (this.emitter.listenerCount(routes.events.EventType.proposerSlashing)) {
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/options/beaconNodeOptions/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ export function parseListenArgs(args: NetworkArgs) {
// If listenAddress is explicitly set, use it
// If listenAddress6 is not set, use defaultListenAddress
const listenAddress = args.listenAddress ?? (args.listenAddress6 ? undefined : defaultListenAddress);
const port = listenAddress ? (args.port ?? defaultP2pPort) : undefined;
const discoveryPort = listenAddress ? (args.discoveryPort ?? args.port ?? defaultP2pPort) : undefined;
const port = listenAddress ? args.port ?? defaultP2pPort : undefined;
const discoveryPort = listenAddress ? args.discoveryPort ?? args.port ?? defaultP2pPort : undefined;

// Only use listenAddress6 if it is explicitly set
const listenAddress6 = args.listenAddress6;
const port6 = listenAddress6 ? (args.port6 ?? defaultP2pPort6) : undefined;
const discoveryPort6 = listenAddress6 ? (args.discoveryPort6 ?? args.port6 ?? defaultP2pPort6) : undefined;
const port6 = listenAddress6 ? args.port6 ?? defaultP2pPort6 : undefined;
const discoveryPort6 = listenAddress6 ? args.discoveryPort6 ?? args.port6 ?? defaultP2pPort6 : undefined;

return {listenAddress, port, discoveryPort, listenAddress6, port6, discoveryPort6};
}
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/util/gitData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export function readAndGetGitData(): GitData {
branch:
currentGitData.branch && currentGitData.branch.length > 0
? currentGitData.branch
: (persistedGitData.branch ?? ""),
: persistedGitData.branch ?? "",
commit:
currentGitData.commit && currentGitData.commit.length > 0
? currentGitData.commit
: (persistedGitData.commit ?? ""),
: persistedGitData.commit ?? "",
};
} catch (e) {
return {
Expand Down
4 changes: 2 additions & 2 deletions packages/prover/src/utils/gitData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export function readAndGetGitData(): GitData {
branch:
currentGitData.branch && currentGitData.branch.length > 0
? currentGitData.branch
: (persistedGitData.branch ?? ""),
: persistedGitData.branch ?? "",
commit:
currentGitData.commit && currentGitData.commit.length > 0
? currentGitData.commit
: (persistedGitData.commit ?? ""),
: persistedGitData.commit ?? "",
};
} catch (e) {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/promise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export async function resolveOrRacePromises<T extends NonEmptyArray<PromiseLike<

const promiseResults = promises.map((p) => wrapPromise(p)) as ReturnPromiseWithTuple<T>;
// We intentionally want an array of promises here

// eslint-disable-next-line @typescript-eslint/no-floating-promises
promises = (promiseResults as PromiseResult<T>[]).map((p) => p.promise) as unknown as T;

try {
Expand Down
36 changes: 2 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3050,13 +3050,6 @@
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.4.tgz#1a31c3d378850d2778dabb6374d036dcba4ba708"
integrity sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==

"@types/buffer-xor@^2.0.0":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@types/buffer-xor/-/buffer-xor-2.0.2.tgz#d8c463583b8fbb322ea824562dc78a0c3cea2ca6"
integrity sha512-OqdCua7QCTupPnJgmyGJUpxWgbuOi0IMIVslXTSePS2o+qDrDB6f2Pg44zRyqhUA5GbFAf39U8z0+mH4WG0fLQ==
dependencies:
"@types/node" "*"

"@types/cacheable-request@^6.0.1":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183"
Expand Down Expand Up @@ -4633,13 +4626,6 @@ buffer-xor@^1.0.3:
resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz"
integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=

buffer-xor@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289"
integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==
dependencies:
safe-buffer "^5.1.1"

[email protected], buffer@^4.3.0:
version "4.9.2"
resolved "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz"
Expand Down Expand Up @@ -12104,16 +12090,7 @@ string-argv@~0.3.1:
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6"
integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -13697,7 +13674,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -13715,15 +13692,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 72b8074

Please sign in to comment.