@@ -193,31 +193,14 @@ describe('TestMassiveActionHandler', () => {
193193 actionReader . getLastIrreversibleBlockNumber = jest . fn ( ) . mockReturnValue ( 2 )
194194 const nextBlock = await actionReader . getNextBlock ( )
195195 expect ( nextBlock . lastIrreversibleBlockNumber ) . toEqual ( 2 )
196- await actionHandler . handleBlock ( nextBlock , true )
196+ await actionHandler . handleBlock ( nextBlock , false )
197197
198198 const nextBlock2 = await actionReader . getNextBlock ( )
199- await actionHandler . handleBlock ( nextBlock2 , true )
199+ await actionHandler . handleBlock ( nextBlock2 , false )
200200 let result = await massiveInstance . query ( 'select cyanaudit.fn_get_is_enabled();' )
201201 expect ( result [ 0 ] . fn_get_is_enabled ) . toBe ( false )
202202 expect ( actionHandler . _getCyanAuditStatus ( ) ) . toEqual ( false )
203203
204- const nextBlock3 = await actionReader . getNextBlock ( )
205- await actionHandler . handleBlock ( nextBlock3 , true )
206- result = await massiveInstance . query ( 'select cyanaudit.fn_get_is_enabled();' )
207- expect ( result [ 0 ] . fn_get_is_enabled ) . toBe ( true )
208- expect ( actionHandler . _getCyanAuditStatus ( ) ) . toEqual ( true )
209- } )
210-
211- it ( 'with Cyan Audit on if isReplay is false' , async ( ) => {
212- actionReader . getLastIrreversibleBlockNumber = jest . fn ( ) . mockReturnValue ( 2 )
213- const nextBlock = await actionReader . getNextBlock ( )
214- await actionHandler . handleBlock ( nextBlock , false )
215- const nextBlock2 = await actionReader . getNextBlock ( )
216- await actionHandler . handleBlock ( nextBlock2 , false )
217- let result = await massiveInstance . query ( 'select cyanaudit.fn_get_is_enabled();' )
218- expect ( result [ 0 ] . fn_get_is_enabled ) . toBe ( true )
219- expect ( actionHandler . _getCyanAuditStatus ( ) ) . toEqual ( true )
220-
221204 const nextBlock3 = await actionReader . getNextBlock ( )
222205 await actionHandler . handleBlock ( nextBlock3 , false )
223206 result = await massiveInstance . query ( 'select cyanaudit.fn_get_is_enabled();' )
@@ -229,11 +212,11 @@ describe('TestMassiveActionHandler', () => {
229212 actionReader . getLastIrreversibleBlockNumber = jest . fn ( ) . mockReturnValue ( 2 )
230213 const nextBlock = await actionReader . getNextBlock ( )
231214 expect ( nextBlock . lastIrreversibleBlockNumber ) . toEqual ( 2 )
232- await actionHandler . handleBlock ( nextBlock , true )
215+ await actionHandler . handleBlock ( nextBlock , false )
233216 const nextBlock2 = await actionReader . getNextBlock ( )
234- await actionHandler . handleBlock ( nextBlock2 , true )
217+ await actionHandler . handleBlock ( nextBlock2 , false )
235218 const nextBlock3 = await actionReader . getNextBlock ( )
236- await actionHandler . handleBlock ( nextBlock3 , true )
219+ await actionHandler . handleBlock ( nextBlock3 , false )
237220 const result = await massiveInstance . query ( 'select cyanaudit.fn_get_is_enabled();' )
238221 expect ( result [ 0 ] . fn_get_is_enabled ) . toBe ( true )
239222 expect ( actionHandler . _getCyanAuditStatus ( ) ) . toEqual ( true )
0 commit comments