File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -656,6 +656,21 @@ export class SpokePoolClient extends BaseAbstractClient {
656
656
}
657
657
658
658
if ( this . depositHashes [ getRelayEventKey ( deposit ) ] !== undefined ) {
659
+ // Sanity check that this event is not a duplicate, even though the relay data hash is a duplicate.
660
+ const allDeposits = this . _getDuplicateDeposits ( deposit ) . concat ( this . depositHashes [ getRelayEventKey ( deposit ) ] ) ;
661
+ if (
662
+ allDeposits . some ( ( e ) => {
663
+ return e . transactionHash === deposit . transactionHash && e . logIndex === deposit . logIndex ;
664
+ } )
665
+ ) {
666
+ this . logger . warn ( {
667
+ at : "SpokePoolClient#update" ,
668
+ chainId : this . chainId ,
669
+ message : "Duplicate deposit found with same transaction hash and log index" ,
670
+ deposit,
671
+ } ) ;
672
+ continue ;
673
+ }
659
674
assign ( this . duplicateDepositHashes , [ getRelayEventKey ( deposit ) ] , [ deposit ] ) ;
660
675
continue ;
661
676
}
You can’t perform that action at this time.
0 commit comments