@@ -34,15 +34,12 @@ export async function startAnvil(
3434 * L1-finality-based logic work without needing hundreds of mined blocks.
3535 */
3636 slotsInAnEpoch ?: number ;
37- < < << << < HEAD
3837 /**
3938 * If provided, the date provider will be synced to anvil's block time on every mined block.
4039 * This keeps the dateProvider in lockstep with anvil's chain time, avoiding drift between
4140 * the wall clock and the L1 chain when computing L1 slot timestamps.
4241 */
4342 dateProvider ?: TestDateProvider ;
44- === === =
45- > >>> >>> origin / backport - to - v4 - next - staging
4643 } = { } ,
4744) : Promise < { anvil : Anvil ; methodCalls ?: string [ ] ; rpcUrl : string ; stop : ( ) => Promise < void > } > {
4845 const anvilBinary = resolve ( dirname ( fileURLToPath ( import . meta. url ) ) , '../../' , 'scripts/anvil_kill_wrapper.sh' ) ;
@@ -118,23 +115,15 @@ export async function startAnvil(
118115 child . once ( 'close' , onClose ) ;
119116 } ) ;
120117
121- < < < << << HEAD
122118 // Continue piping for logging, method-call capture, and/or dateProvider sync after startup.
123119 if ( logger || opts . captureMethodCalls || opts . dateProvider ) {
124- === = ===
125- // Continue piping for logging / method-call capture after startup.
126- if ( logger || opts . captureMethodCalls ) {
127- >>> > >>> origin / backport - to - v4 - next - staging
128120 child . stdout ?. on ( 'data' , ( data : Buffer ) => {
129121 const text = data . toString ( ) ;
130122 logger ?. debug ( text . trim ( ) ) ;
131123 methodCalls ?. push ( ...( text . match ( / e t h _ [ ^ \s ] + / g) || [ ] ) ) ;
132- < < < << << HEAD
133124 if ( opts . dateProvider ) {
134125 syncDateProviderFromAnvilOutput ( text , opts . dateProvider ) ;
135126 }
136- = === ===
137- >>> >>> > origin / backport - to - v4 - next - staging
138127 } ) ;
139128 child . stderr ?. on ( 'data' , ( data : Buffer ) => {
140129 logger ?. debug ( data . toString ( ) . trim ( ) ) ;
@@ -181,7 +170,6 @@ export async function startAnvil(
181170 return { anvil : anvilObj , methodCalls, stop, rpcUrl : `http://127.0.0.1:${ port } ` } ;
182171}
183172
184- << < < < << HEAD
185173/** Extracts block time from anvil stdout and syncs the dateProvider. */
186174function syncDateProviderFromAnvilOutput ( text : string , dateProvider : TestDateProvider ) : void {
187175 // Anvil logs mined blocks as:
@@ -195,8 +183,6 @@ function syncDateProviderFromAnvilOutput(text: string, dateProvider: TestDatePro
195183 }
196184}
197185
198- === = ===
199- > >>> > >> origin / backport - to - v4 - next - staging
200186/** Send SIGTERM, wait up to 5 s, then SIGKILL. All timers are always cleared. */
201187function killChild ( child : ChildProcess ) : Promise < void > {
202188 return new Promise < void > ( resolve => {
0 commit comments