func (e *ETHScanner) processReorg(block *etypes.Header) ([]stypes.TxIn, error) {
    previousHeight := block.Number.Int64() - 1
    prevBlockMeta, err := e.blockMetaAccessor.GetBlockMeta(previousHeight)
    if err != nil {
        return nil, fmt.Errorf("fail to get block meta of height(%d) : %w", previousHeight, err)
    }
    if prevBlockMeta == nil {
        return nil, nil
    }
    // the block's previous hash need to be the same as the block hash chain client recorded in block meta
    if strings.EqualFold(prevBlockMeta.BlockHash, block.ParentHash.Hex()) {
        return nil, nil
    }
    // If reorg detected, further transaction verification is needed here
}
func (e *ETHScanner) processReorg(block *etypes.Header) ([]stypes.TxIn, error) {
    previousHeight := block.Number.Int64() - 1
    prevBlockMeta, err := e.blockMetaAccessor.GetBlockMeta(previousHeight)
    if err != nil {
        return nil, fmt.Errorf("fail to get block meta of height(%d) : %w", previousHeight, err)
    }
    if prevBlockMeta == nil {
        return nil, nil
    }
    if !strings.EqualFold(prevBlockMeta.BlockHash, block.ParentHash.Hex()) {
        // Re-fetch and reprocess transactions from the affected block
        return e.reprocessTxsForHeight(previousHeight)
    }
    return nil, nil
}
if strings.EqualFold(prevBlockMeta.BlockHash, block.ParentHash.Hex()) {
    return nil, nil
}
// Missing implementation to handle reprocessing of transactions in orphaned blocks
