Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

fix: sync task #965

Merged
merged 4 commits into from
May 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions nets/DevNetSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export abstract class DevNetSpec extends NetSpec {
readonly binary
readonly chain
readonly nodeCount
#rawChainSpecPath?: Promise<string>
kratico marked this conversation as resolved.
Show resolved Hide resolved
constructor(props: DevNetProps) {
super()
this.binary = props.bin
Expand All @@ -41,11 +42,15 @@ export abstract class DevNetSpec extends NetSpec {
}

async rawChainSpecPath(signal: AbortSignal, devnetTempDir: string) {
return createRawChainSpec(
this.tempDir(devnetTempDir),
await this.binary(signal),
this.chain,
)
const binary = await this.binary(signal)
if (!this.#rawChainSpecPath) {
this.#rawChainSpecPath = createRawChainSpec(
this.tempDir(devnetTempDir),
binary,
kratico marked this conversation as resolved.
Show resolved Hide resolved
this.chain,
)
}
return this.#rawChainSpecPath
}

async preflightNetwork(signal: AbortSignal, devnetTempDir: string) {
Expand Down