File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -436,10 +436,7 @@ export async function getKryptonContext(): Promise<KryptonContext> {
436436 } ) ;
437437 const api = await startApiServer ( { datastore : db , writeDatastore : db , chainId : ChainID . Testnet } ) ;
438438 const client = new StacksCoreRpcClient ( { host : 'localhost' , port : 20443 } ) ;
439- await standByForPoxToBeReady ( client ) ;
440-
441439 const stacksNetwork = new StacksTestnet ( { url : `http://${ client . endpoint } ` } ) ;
442-
443440 const bitcoinRpcClient = new RPCClient ( {
444441 url : ENV . BTC_RPC_HOST ,
445442 port : ENV . BTC_RPC_PORT ,
@@ -458,6 +455,13 @@ export async function getKryptonContext(): Promise<KryptonContext> {
458455 api,
459456 } ;
460457
458+ try {
459+ await standByForPoxToBeReady ( client ) ;
460+ } catch ( error ) {
461+ await stopKryptonContext ( testEnv ) ;
462+ throw error ;
463+ }
464+
461465 return testEnv ;
462466}
463467
You can’t perform that action at this time.
0 commit comments